The president of Mexico, Andrés Manuel López Obrador, granted asylum in the country to the family of Pedro Castillo.
In response, Peru declared the Mexican ambassador persona "non grata" on Tuesday.
The Mexican authorities indicated, however, that they will maintain relations with Peru to protect Mexicans in the South American country.