The Trump administration has warned American citizens against traveling to either China or Hong Kong to prevent their "arbitrary detention" due to the "arbitrary enforcement of local laws."

This stunning travel advisory on Tuesday from the Department of State warns Americans that China imposes "arbitrary detention and exit bans" to compel cooperation with investigations, pressure family members to return to China from abroad, influence civil disputes and "gain bargaining leverage over foreign governments."

It also said, "U.S. citizens traveling or residing in China or Hong Kong, may be detained without access to U.S. consular services or information about their alleged crime. U.S. citizens may be subjected to prolonged interrogations and extended detention without due process of law."

In tells U.S. citizens that in Hong Kong, China "unilaterally and arbitrarily exercises police and security power." It also said new legislation by the Chinese-controlled Hong Kong government also covers offenses committed by non-Hong Kong residents or organizations outside Hong Kong.

This law will subject U.S. citizens who publicly criticize China to a "heightened risk of arrest, detention, expulsion, or prosecution."

The advisory said U.S. citizens in Hong Kong are "strongly cautioned to be aware of their surroundings and avoid demonstrations." It said that in most cases, U.S. citizens only become aware of an exit ban when they attempt to leave China.

It also said there is no reliable mechanism or legal process to find out how long the ban might continue or to contest it in a Chinese court of law. China does not recognize dual nationality. China's laws mean dual citizens and U.S. citizens of Chinese heritage might be subject to additional scrutiny and harassment. In addition, China may prevent the U.S. Embassy from providing consular services.

China immediately assailed the advisory. Its Ministry of Foreign Affairs said the U.S. should "fully respect the facts and should not engage in unwarranted political manipulation" when issuing such advisories.

"China has always protected the safety and legal rights of foreigners in China in accordance with (Chinese) law," claimed ministry spokesperson Wang Wenbin. "China is one of the safest countries in the world."

Last month, the Trump administration suspended or terminated three bilateral agreements covering extradition and tax exemptions after Hong Kong's legislature approved a harsh national security law crafted by China. It said China violated its pledge for Hong Kong to retain autonomy for 50 years after Hong Kong's 1997 handover to China.

Other Western countries have also suspended their extradition treaties with Hong Kong following the national security's law's passage.