BEIJING, Jan 23 (Reuters) - Residents of China's Wuhan scrambled to stock up on supplies on Thursday as authorities suspended transport links in and out of the city in a bid to stop the spread of a new coronavirus that has raised fears of a global pandemic.

The virus first appeared in the central city of 11 million people last month and is suspected to have jumped to people from an animal in a market where animals were sold illegally.

It has gone on to kill 17 people and infected nearly 600, most in China but cases have been detected as far away as the United States.

The city government said it was suspending all buses, trains, subways, ferries and other long-distance transport as of 10 a.m. (0200 GMT) in an effort to keep the virus from spreading.

Flights out of the city were also being suspended, it said.

The transport lock-down comes just before the Lunar New Year when hundreds of millions of people travel home or go on holidays abroad.

The city made no mention of a ban on private vehicles leaving but one resident told Reuters she could not drive out of the city because guards were blocking the entrance to a highway she hoped to take.

Authorities have advised residents not to leave the city.

Hugo Guo, a 22-year-old university student who returned to Wuhan for the holiday, told Reuters he was resigned to being confined to the city for now but would be keen to get back to his studies in Shanghai.

"I find it acceptable to have to stay at home, but I'm most worried about whether I'll be able to return to school," Guo said by text message.

Footage from state media posted on Twitter showed the city's Hankou railway station nearly empty, its gates barred and the announcement on the suspension of transport posted prominently outside.

People were seen queuing at the station's taxi rank but there did not appear to be many cabs operating.

LOTS IN THE SUPERMARKET

Flight tracking data showed that some planes were still flying out of the city after 10 a.m., however.

Several Wuhan residents told Reuters people were rushing to stockpile supplies. Big supermarkets were teeming with people and many shelves for staples like meat, vegetables and instant noodles were bare, they said.

"Everyone is on a buying spree," said one Weibo user, showing a picture of long queue at a checkout aisle.

People took to social media to complain about surging prices for vegetables and other groceries.

"No one will object to Wuhan being sealed but you need to let Wuhan's residents be able to eat and live," said another user of the Weibo social media platform.

Posted videos showed long queues at petrol stations. One resident said he had to wait for an hour before he could fuel up his car.

In Beijing, a group of passengers boarded one of the last scheduled flights into Wuhan. One, named Jane, said she was "very uneasy" given the situation but had to go back for her child.

Another passenger, who only identified himself by the surname Yang, said he was not scared to be travelling to Wuhan.

"I'm a brave man," he said.

"It's not like it will be only me." (Reporting by Sophie Yu, Yawen Chen, Huizhong Wu, Judy Hua, Lusha Zhang and Martin Pollard Writing by Se Young Lee Editing by Robert Birsel)