MEXICO CITY — “Try not to breathe in Mexico City.” That’s the advice of one newspaper columnist as the capital endures one of its worst pollution emergencies in years.

This sprawling megalopolis has been blanketed in smoky haze since last weekend, the result of dozens of forest fires and hot, windless weather at the end of the dry season.

On Thursday, the government took the significant step of closing primary schools, along with limiting public-works projects. It also ordered tens of thousands of vehicles off the streets.

Authorities shut down playgrounds in the capital’s sprawling Chapultepec Park as parents were advised to keep children indoors and windows closed. A semifinal match between first-division soccer teams Club America and Leon was moved from Mexico City to Queretaro because of the air.

The government reported that levels of particulate matter of 2.5 micrometers or less, known as PM2.5, reached 148 micrograms per cubic meter of air Thursday. That’s about six times the daily limit the World Health Organization recommends. Ozone levels were also high.

The Mexican capital has long suffered from smog, because it’s located in a “bowl” between mountains that trap pollutants. In 1992, the United Nations described it as the most polluted city in the world. At the time, the soaring ozone levels were blamed for an estimated 1,000 deaths a year.

The city has come a long way since then, as a result of an energetic effort to replace old cars, expand public transportation, remove lead from gasoline, and close refineries and factories.

Mayor Claudia Sheinbaum has been criticized for not declaring a pollution emergency until Tuesday. The leftist mayor, who took office in December, said the city didn’t have protocols to deal with the particulate levels.

“Why didn’t she do it starting on Sunday, or Saturday, when the quality of the air was obviously bad?” asked Paola Virrueta, a columnist for the Excelsior daily. She wryly advised readers to protect themselves by not breathing.

About 20 million people live in the Mexico City area, one of the biggest urban concentrations on the planet.

Gabriela Martinez contributed to this report.