The federal government is warning Australians that if they travel to China, they could be arbitrarily detained.
Australians have been warned they may be at risk of arbitrary detention if they ignore government warnings and travel to China.
The Department of Foreign Affairs and Trade changed its advice on Tuesday, although the Level 4 "do not travel" alert remains in place.
"If you're already in China, and wish to return to Australia, we recommend you do so as soon as possible by commercial means," the advice read.
"Authorities have detained foreigners because they're 'endangering national security'. Australians may also be at risk of arbitrary detention. Do not travel to China."
China's foreign ministry said in response that "foreigners in China have absolutely nothing to worry about as long as they abide by the law."
Ministry spokesman Zhao Lijian told reporters that China hoped Australia would "remain objective and fair and do more to benefit the development of China-Australia relations".
The Canadian government issued a similar warning to Australia about travelling to China last year after a Canadian drug suspect was sentenced to death.
Canadian Prime Minister Justin Trudeau expressed "extreme concern" that China had "chosen to arbitrarily" apply the death penalty.
The Canadian government then issued a new travel advisory urging citizens to "exercise a high degree of caution in China due to the risk of arbitrary enforcement of local laws."
Australian man Karm Gilespie is currently facing the death penalty in China, seven years after his arrest in Guangzhou in 2013.
Prime Minister Scott Morrison in June said Australian officials had raised Mr Gilespie's case with Chinese counterparts on a number of occasions and were still working to secure his freedom.
Last year China arrested Australian-Chinese writer Yang Hengjun, who was indicted earlier this year for espionage.
Tensions between the two countries have become increasingly strained on a number of fronts in recent months.
Australia has angered China by pushing for an investigation into the cause of the coronavirus outbreak and by speaking out against Chinese influence in domestic politics.
Australia has also floated the idea of granting safe haven visas to Hong Kong residents fleeing the new China security laws.
A 2019 Amnesty International report said China had "legalised arbitrary and secret detention", allowing for prolonged periods of no contact with detainees, and an increased risk of torture and other ill-treatment and forced "confessions".
The UN Working Group on Enforced or Involuntary Disappearances continues to seek permission to visit China to get a first-hand account of the situation.
Additional reporting: AAP, AFP