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”.
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.
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.
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.