By Michael Bristow
BBC News, Beijing
Stringent border controls did not prevent H1N1 spreading into China
China is fighting a rapid rise in the number of swine flu cases after initially appearing to have the outbreak under control.
The ministry of health says there have been seven deaths and nearly 50,000 confirmed cases.
China tried to prevent the virus entering the country by employing strict quarantine measures for people arriving with flu-like symptoms.
But it has now turned its efforts to controlling the virus inside China.
"The epidemic has entered a period of high incidence earlier than we expected and the infected cases are rapidly increasing," said Chinese Health Minister Chen Zhu.
High risk groups
Foreigners and Chinese citizens initially faced tough quarantine measures when they arrived at the country's ports and airports.
Many of those with flu-like symptoms were put into isolation for seven days in the first few months following the worldwide outbreak of the flu, also known as H1N1.
But now with the virus reported to be in 31 provinces and regions, the Chinese government has changed its approach.
"In the first few months they were trying to stop the virus at the borders because they were mostly seeing imported cases," said Vivian Tan, spokeswoman for the World Health Organisation in China.
"But they realised it was too much effort, with very little impact. They then shifted focus to controlling it inside the country."
The number of cases has risen rapidly over recent days and hospitals have been inundated with sick people.
China's ministry of health reported nearly 4,000 new cases over just three days up until Monday.
It says 80% of people suffering from the flu have contracted the H1N1 strain.
Teachers have been testing the temperatures of children as they walk through school gates, and some of those with a fever are sent home.
In an indication of the growing concern about the outbreak, China's premier, Wen Jiabao, donned a face mask and visited a children's hospital in Beijing over the weekend and called for tightened measures to combat the flu.
China has developed its own vaccine to battle the virus and hopes to produce 100 million doses by the beginning of next year.
It has drawn up a list of people who will get it first. Those considered most at risk include teachers and students.
The WHO has classified the H1N1 outbreak as a pandemic.