Updated

There are now 40 confirmed cases of swine flu in the U.S., the World Health Organization said Monday, adding that it is "very concerned" about the new strain of influenza.

Governments are racing to find and contain pockets of swine flu around the globe, seeking to stem both the threat of a pandemic and public panic.

PHOTOS: Swine Flu Around the World

"We're preparing in an environment where we really don't know ultimately what the size or seriousness of this outbreak is going to be," U.S. Homeland Security Secretary Janet Napolitano said Sunday.

Meanwhile, President Barack Obama said Monday the spread of swine flu is a cause for concern but "not a cause of alarm" and he's staying on top of the problem.

Obama told a gathering of scientists Monday that the administration is "closely monitoring" cases of swine flu, how many people have it and what the threat is. Obama also said the American people can expect to get regular and frequent updates about what Washington is doing.

He said the swine flu threat dramatizes how the United States cannot allow itself to fall behind in scientific and medical research.

In Mexico, the outbreak's epicenter, soldiers handed out 6 million face masks to help stop the spread of the novel virus that is suspected in up to 103 deaths. Most other countries are reporting only mild cases so far, with most of the sick already recovering. Cases have been confirmed in Canada — six — and the U.S. — 20.

Click for more about the swine flu.

Spain reported its first confirmed swine flu case on Monday and said another 17 people were suspected of having the disease. The European Union health commissioner advised Europeans to avoid nonessential travel to Mexico and the United States.

Other countries, including New Zealand, were investigating whether other people with flulike symptoms really have this new swine flu or something else.

There is not a global pandemic yet, but waiting until scientists know if the new virus is going to spread rapidly and easily would be too late.

The U.S. declared the health emergency amid confusion about whether new numbers really mean ongoing infections — or just that health officials had missed something simmering for weeks or months. But the move allows the government to ship roughly 12 million doses of flu-fighting medications from a federal stockpile to states in case they eventually need them.

A spokesman for the World Health Organization, Peter Cordingley, said the virus was spreading quickly in Mexico and the southern U.S. and has the potential to become a pandemic and a global threat.

The World Bank said it would send Mexico $25 million in loans for immediate aid and $180 million in long-term assistance to address the outbreak, plus advice on how other nations have dealt with similar crises. Mexico officials say the flu strain may have sickened 1,614 people since April 13 but laboratory testing to confirm that and how many truly died from it — at least 22 so far out of the 103 suspected deaths — is taking time.

Worldwide, attention focused sharply on travelers.

"It was acquired in Mexico, brought home and spread," Nova Scotia's chief public health officer, Dr. Robert Strang, said of Canada's first confirmed cases.

A New York City school where eight cases were confirmed will be closed Monday and Tuesday, and 14 schools in Texas, including a high school where two cases were confirmed, will be closed for at least the next week. Some schools in California and Ohio also were closing after students were found or suspected to have the flu.

China, Russia and Taiwan began planning to quarantine travelers arriving from flu-affected areas if they have symptoms. Italy, Poland and Venezuela advised citizens to postpone travel to affected parts of Mexico and the U.S.

Singapore, Thailand, Japan, Indonesia, South Korea and the Philippines were checking for signs of fever among passengers arriving at airports from North America. In Malaysia, health workers in face masks took the temperatures of passengers as they arrived from a flight from Los Angeles.

Travelers with flu-like symptoms would be given detailed health checks.

Multiple airlines, including American, United, Continental, US Airways, Mexicana and Air Canada, are waiving their usual penalties for changing reservations for anyone traveling to, from, or through Mexico, but have not canceled flights.

Officials along the U.S.-Mexico border were asking health care providers to take respiratory samples from patients who appear to have the flu. Travelers were being asked if they visited flu-stricken areas.

The U.S. plans to warn against travel to Mexico later today.