The United States has declared a public health emergency and temporarily banned the entry of foreign nationals who travelled to China recently, joining a growing list of nations to impose travel restrictions due to the coronavirus outbreak that has killed more than 250 people and infected thousands.

US President Donald Trump signed an order on Friday barring entry to foreign nationals, other than immediate family members of American citizens and permanent residents, who travelled in China in the last 14 days, which scientists say is the longest incubation period for the virus.

More:

Americans returning from China will be allowed into the country, but will face screening at select ports of entry and required to undertake 14 days of self-screening. Those returning from Hubei will be subject to a 14-day quarantine.

China's government criticised the measure, which it said contradicted the World Health Organization's appeal to avoid travel bans, and slammed "unfriendly comments" made by the US that Beijing was failing to cooperate.

"Just as the WHO recommended against travel restrictions, the US rushed to go in the opposite way. Certainly not a gesture of goodwill," said foreign ministry spokeswoman Hua Chunying.

There have been seven confirmed US cases of the 2019 Novel Coronavirus, which originated in December in a live seafood market in Wuhan in China's Hubei province.

With the United Kingdom, Russia and Sweden among the countries confirming their first infections, the virus has now spread to more than two dozen nations, sending governments scurrying to limit their exposure.

The US move follows similar steps by countries, including Italy, Singapore, and China's northern neighbour, Mongolia.

The US, Japan, the UK, Germany and some other affected nations have already advised their citizens not to travel to China.

On Saturday, Australia said it would bar non-citizens arriving from China from entering the country under new measures to combat the spread of the coronavirus epidemic.

Prime Minister Scott Morrison said only "Australian citizens, Australian residents, dependents, legal guardians or spouses" would be permitted into the country from China.

The WHO has already declared the epidemic a global emergency. Death toll in China has risen to 259 while total infections reached nearly 12,000, surpassing the severe acute respiratory syndrome (SARS) epidemic 20 years ago.

Three US airlines - American, Delta and United - said they would soon suspend all flights to China.