Miguel de la Madrid Hurtado, who led Mexico from 1982 to 1988 during economic crisis and a devasting earthquake, died Sunday at age 77, President Felipe Calderon announced on his Twitter account.

A spokeswoman for Calderon's office speaking on condition of anonymity because she was not authorized to speak to the press confirmed Sunday to the Associated Press that the message was posted by Calderon.

Calderon said he is profoundly sorry for the death of ex-President De la Madrid.

The cause of death was not immediately announced, but the former president had been hospitalized for respiratory problems since late last year.

Several false rumors about De la Madrid's death surfaced in December, and Calderon even sent an incorrect tweet on his official Twitter account at that time offering condolences to the former president's family. He corrected that earlier false report minutes later.

During his presidency, De la Madrid pulled Mexico back from economic collapse but left it with a political crisis.

His term from 1982 to 1988 was a grim time for most Mexicans, a six-year hangover after spending binge by the previous government that was convinced soaring oil prices would never fall. When they did, the buying power of Mexican salaries was slashed in half as inflation chewed up paychecks.

In 1985, a magnitude-8.1 earthquake killed an estimated 9,000 people and flattened parts of the capital. A fiery explosion at a government gas facility killed more than 500 people on the outskirts of Mexico City. The government's handling of the election to replace de la Madrid caused a political scandal that later helped topple the political system that dominated Mexico for most of the 20th century.

But the initial economic panic was so deep that many thought de la Madrid did well just by not making things worse.

As he put it just before leaving office, I took a country with great problems and leave it with problems.

De la Madrid also launched a historic free-market transformation of Mexico's economy. He sold off about 750 of the 1,155 companies the government had owned when he took office and signed international free-trade treaties that paved the way for the North American Free Trade Agreement and helped Mexico develop into a global industrial power, although one overwhelmingly dependent on the United States.