BEIJING - Major Chinese cities, including the capital of Beijing and virus-hit Wuhan, have banned all large gatherings over the coming Lunar New Year festival, the most important holiday on the Chinese calendar, in an effort contain the rapidly spreading outbreak.

The announcement came Thursday night as authorities extended travel restrictions imposed on Wuhan to surrounding municipalities, shutting down travel networks and attempting to quarantine some 25 million people - more than the entire population of Florida.

The extreme measures were accompanied by other indications that Communist Party authorities were struggling to control of the outbreak, notably the aggressive censorship of all social media and commentary suggesting this was taking place.

But some outspoken doctors warned that the controls would not be enough to stop the spread of the pneumonia-like virus, which has now killed 17 people in Wuhan and surrounding Hubei province. The number of people infected in China stood at 617 on Thursday afternoon.

"A bigger outbreak is certain," said Guan Yi, a virologist who helped identify severe acute respiratory syndrome (SARS) in 2003. He estimated - "conservatively," he said - that this outbreak could be 10 times bigger than the SARS epidemic because that virus was transmitted by only a few "super spreaders" in a more defined part of the country.

"We have passed through the 'golden period' for prevention and control," he told Caixin magazine from self-imposed quarantine after visiting Wuhan. "What's more, we've got the holiday traffic rush and a dereliction of duty from certain officials."

The Lunar New Year holiday, a week-long period when millions of Chinese travel to their hometowns, forming the biggest human migration on the planet, officially begins on Friday.

Authorities initially said that the virus, which began in a Wuhan food market selling exotic animals for consumption, was mild and could not be transmitted between humans. But that changed this week when the numbers of people infected by the virus, which has an incubation period as long as 14 days, began to rise rapidly.

Even one of the government's top experts, who had played down the prospects for widespread infection, contracted the virus.

Now cases have been detected around the country, from Harbin in the north to Shenzhen in the south. The Chinese territories of Hong Kong and Macao have both reported cases, as have countries including the United States, Japan, South Korea and Thailand.

Airports around the world, from London to Dubai to Atlanta, have put special screening measures in place to detect passengers arriving from China with fevers.

Among the new measures introduced Thursday night, Beijing said that it was restricting public gatherings over the Lunar New Year holiday, which official begins on Friday and is often celebrated with large fireworks displays and popular fairs at temples.

"In order to comply with epidemic prevention and control works, and to put people's lives, safety, and health in the first place, mass gatherings should be reduced in order to ensure a harmonious and peaceful Spring Festival," the Beijing Culture and Tourism Bureau said in a statement.

"It is decided that Beijing will cancel all large-scale events, including temple fairs, effective from today," it said.

The Forbidden City, the old imperial palace in the heart of Beijing and one of China's top tourist attractions, said it would close its doors until further notice "in order to avoid cross-infection caused by the gathering of people."

Authorities in Wuhan announced even more stringent measures. In addition to banning public gatherings, local officials, wearing masks, announced that the start of the spring semester at all Hubei province schools would be delayed because of the outbreak.

In Zhejiang province, home to 57 million people and tech giants like Alibaba, put out a notice requiring the public "to reduce public gatherings to the maximum extent."

The organs of China's authoritarian state are creaking under the strain.

The ruling Communist Party, which initially tried to show transparency after being criticized for covering up the SARS virus outbreak 17 years ago, has now shown signs of reverting to its default position of censoring bad news.

In a post that was online for less than an hour, the Wuhan Health Commission admitted Thursday that it was struggling under the strain of the outbreak.

"At present, there is an obvious increase in the number of patients with fever in the city, and it is true that there are long queues and a shortage of beds in fever clinics," the commission said.

A post from Wuhan Railway saying that 300,000 people traveled by train out of Wuhan on Wednesday, headed to every corner of the country, was also quickly deleted.

Analysts said the heavy-handed reaction underscored the political risks for Chinese leader Xi Jinping and the ruling Communist Party, already under pressure amid an economic slowdown and accused of mishandling an outbreak of swine flu last year, which led to a sharp spike in prices for China's beloved pork.

"This outbreak may be the biggest threat to Xi and the Party in years, which is why they will stop at nothing to try to control and then eradicate it," said Bill Bishop, publisher of the influential Sinocism newsletter.

The central Chinese city of Wuhan pulsated with fear and anger Thursday, as 11 million people awoke to news that they were being confined to a metropolis-sized quarantine zone designed to contain a widening coronavirus outbreak.

The three main railway stations, 13 bus stations, the entire subway network and almost all city bus lines were shut down at 10 a.m. Thursday. Half of the 566 flights scheduled at Wuhan's international airport for Thursday were canceled, as were 251 ferry sailings on the Yangtze River, according to the Wuhan Transportation Bureau.

Many people flocked to the roads to try to avoid getting caught in the quarantine. Television footage showed health workers in hazmat suits taking motorists' temperatures as they waited at toll booths.

Others did not make it out. Hubei's highway management authority closed multiple expressways in and around Wuhan, and Wuhan traffic police confirmed that while vehicles were allowed to come into the city, they were prohibited from going out except in special cases.

Neighboring Huanggang said it would join Wuhan's quarantine from midnight on Thursday, shutting down transport networks and telling people they should not leave the city without special reason. Nearby Ezhou announced it would close its railway stations "to efficiently cut off channels for spreading the virus."

A raft of Chinese companies, both public and private, began to impose their own travel restrictions to try to avoid infection. CITIC Securities, China's largest investment bank, told employees from Hubei province not to return home for the holidays. It said that if they did, they would have to work remotely for 14 days before being allowed back into the office.

Other measures were taken to limit public gatherings.

English tests scheduled for next month were canceled, and film companies delayed the release of seven blockbuster movies that were expected to attract big crowds over the Spring Festival holiday, which officially starts Friday.

"Everyone wishes for peace and health," the producers of "Detective Chinatown 3" said, announcing the delay. "In the face of the virus, our wills are united like a fortress. We will cooperate hand in hand, and we will overcome difficulties together."

In Macao, where one case has been found, the government said it might shut down the territory's casinos if the epidemic worsens. Macao's gambling sector is seven times the size of Las Vegas's. The authorities have already called off a public festival to ring in the new year.

In Wuhan, a city with about 3 million more people than New York, many residents were incensed at the sudden announcement of the travel restrictions on Thursday.

"I didn't even receive a notice," said one woman who found herself stranded at Hankou Station. She had been on her way from Henan province southwest to Sichuan and was changing trains in Wuhan when she got caught up in the suspension.

She said indignantly that she would go back to Henan. But when a reporter asked how, she conceded that she did not know.

Others interpreted the fact that the health authorities announced the travel ban at 2:30 a.m. as a sign that the outbreak was more serious than they were letting on.

"The notice shouldn't come out so late, when everyone's asleep," said Jeffrey Yang, a 27-year-old Wuhan local working in the financial industry. "It makes people panic and feel like they've missed the opportunity to change their fate."

Yang had planned to leave Wuhan on Friday to join his parents in the southern coastal city of Beihai to celebrate the new year. After a friend called to warn him, he managed to get a flight out before the travel ban came into force. But when he arrived at his destination, the hotel owner refused to allow him to check in after hearing that he had traveled from Wuhan.

"I feel quite nervous," he said. "I think there must be some things about this virus that remain undisclosed."

Some people resorted to extreme measures to escape the travel ban. One man who could not get a taxi to the station to catch an earlier train persuaded a food delivery driver to give him a lift on his scooter. The desperate traveler paid $72 to have the delivery man, who would usually make less than half that in a day, drop him at the station. "We were flying," he said.

Others, especially those in the age groups most affected by the virus, thought the ban was warranted.

"I think we can fully understand why they made the decision; they have no alternative," said Zhu, a 56-year-old university professor in Wuhan who declined to give a full name. "But it's difficult to tell how effective it will be."

Still, distrust of authorities is mounting.

Although local authorities said they had enough food for residents and medical supplies to treat patients, Wuhan residents posted photos on social media showing empty shelves in grocery stores. Prices have spiked, with cabbages selling for double the usual amount.

Wuhan authorities have ordered residents to wear masks in public places, but the People's Daily, the mouthpiece of the Communist Party, posted on social media that the province was short of masks and protective clothing. The post, which was widely shared, was soon deleted.

Speculation swirled that the government had silenced Zhong Nanshan, the renowned respiratory expert who helped discover SARS in 2003 and is known for his bluntness.

Zhong, a member of the National Health Commission's group of experts investigating the outbreak, had been on Chinese television constantly this week and announced the finding that the coronavirus could pass from human to human. But he has disappeared from screens in recent days.

Luwei Rose Luqiu, a journalism professor formerly with the Phoenix Television network, tweeted that Zhong was banned from speaking to media after giving an interview to Phoenix in Guangzhou on Tuesday. Zhong did not answer phone calls from The Washington Post.

There were also widespread reports on social media of hospitals in Wuhan turning away patients, reports that were indirectly confirmed when the Wuhan Health Commission sent out a notice saying the 61 outpatient fever treatment clinics "should not be closed for any reason."

Rebecca Zhang had tried to get treatment for her 65-year-old father, who developed a fever on Jan. 13, at two hospitals in Wuhan, but they were turned away because of "lack of capacity." The hospitals refused to even test him for the coronavirus, apparently to avoid having to admit him, Zhang wrote on Weibo.

Other hospitals would not see him without a positive diagnosis of coronavirus. "He was stuck in an infinite loop!" she wrote on Wednesday, saying he had still not been admitted despite scans showing serious inflammation in both lungs.

Another Wuhan woman, He Lianna, said that her father, who was feverish and having difficulty breathing, was admitted to hospital on Wednesday only after her complaint on social media about the situation was shared thousands of times.

As the uncertainty continued, Guan, the virologist who identified SARS, offered a chilling perspective on the outbreak.

"I've seen it all: bird flu, SARS, influenza A, swine fever and the rest. But the Wuhan pneumonia makes me feel extremely powerless," he told Caixin. "Most of the past epidemics were controllable, but this time, I'm petrified."

The Washington Post’s Wang Yuan, Liu Yang and Lyric Li contributed to this article.