Former Bolivian President Evo Morales has arrived in Mexico City saying he asked for asylum because his life was in danger.
Mr Morales resigned on Sunday after weeks of protests over a disputed presidential election result.
The Mexican jet carrying him landed at an airport in Mexico City, where he gave a brief news conference.
Mr Morales said he was forced to stand down but did so willingly "so there would be no more bloodshed".
He said a price of $50,000 (£38,000) had been put on his head by "coup plotters".
The left-wing leader said he and the Bolivian government were "very grateful" to Mexican President Andres Manuel Lopez Obrador, whom he credited with saving his life.
"While I have life I'll stay in politics, the fight continues. All the people of the world have the right to free themselves from discrimination and humiliation," he added.
Mexican Foreign Minister Marcelo Ebrard said Mr Morales had arrived "safely" in the country, tweeting a picture of the jet that carried him.
Evo llegó sano y salvo a México pic.twitter.com/RVjCnhgUTo— Marcelo Ebrard C. (@m_ebrard) November 12, 2019
Mr Morales, a former coca farmer, was first elected in 2006, the country's first leader from the indigenous community.
He has won plaudits for fighting poverty and improving Bolivia's economy but drew controversy by defying constitutional limits to run for a fourth term in October's election. The poll is alleged to have been rife with irregularities.
Flight 'Plan B'
Smiling and raising his fist in the air, Mr Morales appeared relaxed as he exited the plane at Mexico City's international airport at around 11:15 local time (17:10 GMT).
But Mr Morales's upbeat demeanour belied the difficulties of his journey to Mexico from the Bolivian city of Cochabamba, where he had sought refuge.
The Mexican Air Force jet sent to pick up Mr Morales first stopped off in Peru, where it refuelled and waited for permission to enter Bolivian airspace.
Once on the ground in Bolivia, however, Peru told the plane that "for political reasons" it would not be allowed fly back to the country to refuel.
This is when the Mexican government had to come up with a plan B, Mexico's foreign minister said.
"That was very difficult and very tense, because there was a complicated situation at the airport where Evo Morales was waiting," Mr Ebrard said.
After negotiations with several countries in the region, the plane was granted permission to refuel in Paraguay before it flew to Mexico via Brazil and Peru.
What's the latest in Bolivia?
The deputy head of the Senate, Jeanine Áñez, has declared herself interim president by right of succession despite a boycott by Mr Morales' party.
She promised to bring peace to the country and hold elections as soon as possible.
As Mr Morales prepared to leave for Mexico, unrest again erupted on the streets of the Bolivian administrative capital, La Paz, with angry supporters of the socialist leader clashing with security forces.
Bolivia's military commander ordered troops to support the police, who urged residents to stay indoors in a bid to quell the violence.
On Tuesday, Bolivia's main federation of unions warned it would hold an indefinite strike if the country's leaders did not restore constitutional order and peace within 24 hours.
How did we get here?
Pressure had been growing on Mr Morales since his narrow victory in last month's presidential election.
The result was called into question by the Organization of American States, a regional body, which had found "clear manipulation" and called for the result to be annulled.
In response, Mr Morales agreed to hold fresh elections. But his main rival, Carlos Mesa - who came second in the vote - said Mr Morales should not stand in any new vote.
The chief of the armed forces, Gen Williams Kaliman, then urged Mr Morales to step down in the interests of peace and stability.
Announcing his resignation, Mr Morales said he had taken the decision in order to stop fellow socialist leaders from being "harassed, persecuted and threatened". He also called his removal a "coup".