LIMA: PERU's former president Pedro Castillo was ousted from power on Wednesday in an impeachment vote after failing in his bid to stay in power by dissolving Congress.

Vice President Dina Boluarte was swiftly sworn in to replace him and Castillo was arrested. But what happens to the 53-year-old former teacher now?

WHERE IS CASTILLO NOW?

Castillo is being held at a complex in the Peruvian capital Lima that is the headquarters of the Department of Special Operations, where former President Alberto Fujimori is serving a 25-year jail term.

Castillo was ordered on Thursday by a court to stay there for at least the next seven days as an inquiry into alleged crimes of rebellion and conspiracy proceeds.

But he might be able to consider a sunnier option at some point in the future: political asylum in Mexico.

WOULD CASTILLO BE WELCOME IN MEXICO?

Mexican President Andres Manuel Lopez Obrador, a fellow leftist who has expressed sympathy with Castillo in the past, made clear on Thursday that he is open to offering the former leader asylum.

Lopez Obrador told reporters that Castillo had called him on Wednesday to say he was en route to the Mexican embassy in Lima to request asylum.

But Castillo never made it there before he was arrested by his own security detail, according to local media reports.

The Mexican leader said he had instructed his foreign minister to open the embassy's doors to Castillo.

Mexico's Foreign Minister Marcelo Ebrard posted on Twitter that the Mexican ambassador in Lima met with Castillo on Thursday afternoon.

He said Mexican officials have begun consultations over the asylum request with Peruvian officials, pledging to offer updates later.

WHAT IS MEXICO'S ASYLUM HISTORY?

Mexican officials have often invoked the country's history of offering political asylum to besieged foreign leaders, from democratic opponents of Spain's fascist dictator Francisco Franco in the 20th century, to Bolivia's Evo Morales in 2019, after the former president fled amid protests following a disputed election.

Lopez Obrador has often preached non-intervention in other nations' affairs, but has shown a soft spot for leaders he perceives as ideological soulmates.

On Thursday, some Peruvian lawmakers, including the head of its foreign relations committee, called on Lopez Obrador to stay out of what they said were Peru's internal affairs.

HOW DID CASTILLO GET HERE?

Castillo's rocky tenure spanned just 17 months and was noteworthy for unprecedented turmoil among his ministers - late last month he sworn in his fifth cabinet - in addition to multiple corruption investigations.

The leftist leader ran on a platform of reducing inequality by in part taxing mining companies in the world's second-biggest copper producer, policies he never managed to enact as he lunged from one crisis to another.