MEXICO CITY (Reuters) - Mexico City's government ordered traffic restrictions on Tuesday and recommended people stay indoors due to serious air pollution, issuing its second-highest alert warning for ozone levels for the first time in 13 years.

While conditions persisted, residents were better off inside between 1 p.m. and 7 p.m., should refrain from vigorous exercise in the open and curb sporting activities to avoid respiratory problems, the city said in a statement on Monday.

The government said the alert stemmed from an "extraordinary increase" in ozone concentration due to the presence of a high pressure system and intense solar radiation around greater Mexico City, which is home to more than 20 million people.

Not since September 2002 had the city issued a "phase one" pollution warning for elevated levels of ozone.

A phase one alert was last issued for particle pollution on New Year's Day 2005, a time when air quality was likely affected by heavy use of firecrackers, a city official said.

Ozone, which is a key ingredient of smog, is a form of oxygen created by the reaction of sunlight with air containing other pollutants such as hydrocarbons and nitrogen oxide.

It can cause breathing difficulties and worsen heart disease. Children and the elderly are especially at risk.

(Reporting by Jean Luis Arce and Dave Graham; Editing by Kim Coghill)