The family of Peru's ousted President Pedro Castillo has left Peru for Mexico after the latter offered them asylum.
Mr Castillo remains in detention in Peru.
Peru's foreign minister had earlier granted Mr Castillo's wife and children safe passage from the Mexican embassy in Lima to the airport.
The Mexican ambassador to Lima also departed on board the same plane after Peru had ordered him to leave the country within 72 hours.
Peru's foreign ministry said in its social media accounts that it was expelling Ambassador Pablo Monroy because "of the repeated statements by that country's highest authorities about the political situation in Peru".
Tension between the two countries has been growing since Peru's Congress impeached Mr Castillo on 7 December.
A vast majority of Peruvian lawmakers voted in favour of his impeachment immediately after Mr Castillo declared a state of emergency and announced he was dissolving Congress.
The head of Peru's constitutional court said Mr Castillo's move constituted an "attempted coup" and Congress quickly deposed him.
He was replaced by his vice-president, Dina Boluarte, who has called for elections to be brought forward by two years to April 2024.
On Tuesday, lawmakers backed the earlier election date, but it will still have to be ratified in another vote in the coming months.
It is not yet clear if the move will be enough to quell violent protests by supporters of Mr Castillo, who are calling both for his release and for early elections.
In the hours after his impeachment, Mr Castillo tried to make his way to the Mexican embassy to claim asylum but was stopped on the way by his own bodyguards and taken into custody.
He is currently in detention and under investigation for alleged rebellion and conspiracy.
Mexican President Andrés Manuel López Obrador has sided with Mr Castillo, calling his impeachment "undemocratic".
He also instructed his ambassador to grant asylum to Mr Castillo's wife, Lilia Paredes, and the couple's children.
This caused further anger in Peru, where Ms Paredes is under investigation for her alleged ties to a money laundering ring.
Peruvian opposition legislator Maria del Carmen Alva accused Mexico of "sheltering the corrupt".