Scientists are still struggling to determine how the virus was first passed from pigs to people. Pigs have receptors in their respiratory tracts that make them susceptible to strains of bird and human flu, which can then mutate to create a new virus, as they apparently have in this case, said Joan E. Nichols, an infectious-disease expert and associate director of the Galveston National Laboratory at the University of Texas Medical Branch.

"We consider them the mixing pot. . . . They're a great source to generate something new," she said. "People who work with the pigs can also catch it."

The nationwide shutdown of schools, scheduled to start Tuesday and run until May 6, is part of Mexico's broader effort to limit large gatherings of people to try to stop the contagion.

"We will take advantage of this time so we can all learn what we need to know to protect our health," said Alonso Lujambio, the education secretary.

The mayor of Mexico City, Marcelo Ebrard, said he is considering a complete shutdown of this city of 20 million people, including halting all public transportation. One of the world's busiest subway systems seemed much emptier than normal on Monday, with many people wearing masks to protect themselves. Mexico City malls, movie theaters, museums and restaurants were all closed. Two federal government employees, who both spoke on the condition of anonymity, said that only about a quarter of the employees in their offices showed up to work Monday and that those who did were careful not to touch their colleagues.

"I feel like we are living a science fiction movie," said Cristian González, a film director who was wearing a surgical mask as he stocked up on groceries at a supermarket. "I am 51 years old, and this is the first time in my life Mexico has experienced a crisis like this. . . . This is totally new."

To add to the surreal nature of the day, a 5.6-magnitude earthquake, centered south of the capital, shook Mexico City and briefly interrupted the news conference on swine flu. There were no immediate reports of damage.

The flu has left Mexico bracing for a major shock to its economy, with officials in Mexico City estimating losses of hundreds of millions of dollars in the city alone. The International Monetary Fund predicted last week, before the outbreak was publicized, that the country's economy would contract 3.7 percent in 2009, a figure some banks and brokerages said at the time was optimistic.

"We are going through a significant recession, and this is going to reduce economic activity even further," said Mario Correa, an economist with Scotiabank in Mexico City.

Staff writer Lyndsey Layton in Washington and special correspondent Jonathan Roeder in Mexico City contributed to this report.