Bolivia's former president Evo Morales has arrived in Mexico to take up political asylum, two days after resigning amid mounting protests over his re-election to a fourth term.

The Mexican air force plane carrying the former leader touched down at the Mexico City international airport, where Foreign Minister Marcelo Ebrard - who says Mr Morales was the victim of a "coup" - was waiting to greet him.

Grinning, waving and raising his fist in the air as he touched his heart, Mr Morales thanked Mexican President Andres Manuel Lopez Obrador, saying "he saved my life."

He vowed his flight into exile would not be the end of the story.

"As long as I am alive, I will remain in politics. The struggle goes on," he told a large crowd of journalists gathered at the airport

Earlier Mr Ebrard said the life of Bolivia's first indigenous president was in danger and the decision to grant him asylum was in Mexico's long tradition of sheltering exiles.

Mr Morales' government collapsed on Sunday after ruling party allies quit and the army urged him to step down in the wake of a disputed election.

Looting and roadblocks convulsed Bolivia after Mr Morales stepped down. He said "violent groups" attacked his house.

"His life and integrity are at risk," Mr Ebrard had told reporters earlier. "We will immediately proceed to inform Bolivia's foreign ministry that under international law, it should offer safe conduct."

Mexico would inform the Organization of American States, and the United Nations, he added. The Washington-based OAS delivered a report on Sunday citing serious irregularities during Bolivia's October vote.

Mr Ebrard said earlier today that his government viewed Sunday's events in Bolivia as a "coup" because the military broke with the constitutional order by pressing Mr Morales to resign.

Mexican President Andres Manuel Lopez Obrador praised Mr Morales, saying he chose to resign rather than put the lives of Bolivia's citizens at risk.

Mexico's plane refuelled in Lima before picking up Mr Morales in Bolivia, and Argentina's President-elect Alberto Fernandez praised Peruvian President Martin Vizcarra's cooperation.

"He acted diplomatically to try to facilitate the arrival of the plane for Evo," Mr Fernandez said at an event in Buenos Aires.