Peru has ordered the Mexican ambassador to leave within 72 hours after Mexico granted asylum to the family of ousted Peruvian President Pedro Castillo.
Castillo attempted to dissolve Congress, which led to his removal from office earlier this month.
On suspicion of rebellion and conspiracy, he is being looked into in Peru.
However, Mexico has backed the deposed president and initially indicated that it was thinking about giving him asylum.
President of Mexico Andrés Manuel López Obrador referred to Mr. Castillo’s removal as being undemocratic.
The government of Mexico, according to Foreign Minister Marcelo Ebrard, is negotiating a safe exit for Mr. Castillo’s family, who are currently lodged in the Mexican embassy in Lima, the capital of Peru.
Mexican Foreign Minister Marcelo Ebrard said on Tuesday the government was negotiating safe passage for the family of Mr Castillo, who were inside Mexico’s embassy in the Peruvian capital Lima.
His Peruvian counterpart, Ana Cecilia Gervasi, said safe passage had been granted.
But Mexico’s decision to grant asylum caused further anger in Peru, and Mexican Ambassador Pablo Monroy has now been declared “persona non grata” by the government.
Peru’s foreign ministry said in its social media accounts that it was expelling Mr Monroy because “of the repeated statements by that country’s highest authorities about the political situation in Peru”.
Peruvian opposition legislator Maria del Carmen Alva accused Mexico of “sheltering the corrupt”.
Mr Castillo, who is in custody in Peru, was removed from office after he tried to dissolve Congress.
Facing an impeachment vote, Mr Castillo had announced he was dissolving the opposition-controlled legislative body.
But Congress defied him, voted overwhelmingly to remove him from office, and his bodyguards stopped him from seeking refuge at the Mexican embassy in Lima.
Just hours later, Congress swore in his vice-president, 60-year-old Dina Boluarte, as the new president.
She has been pushing for early elections, and they edged closer on Tuesday as lawmakers voted in favour of the proposals.
This would bring elections forward to April 2024, two years ahead of elections currently scheduled for 2026.
There have been violent protests in which demonstrators have called for fresh general elections. Supporters of Mr Castillo have also taken to the streets to demand his release.