Dina Boluarte has emerged Peru’s new President as she scrambled to form a government on Thursday, a day after the country was thrown into political chaos following the dramatic arrest of her predecessor in an alleged coup attempt.

The South American country’s first ever female leader asked the opposition for a truce as she tried to end the turmoil sparked by President Pedro Castillo, who had attempted to dissolve parliament and rule by decree.

Mr Castillo’s efforts were quickly stamped out by lawmakers who almost unanimously voted him out of office in a dizzying day of high drama, by the end of which former vice-president, Ms Boluarte had emerged as the country’s new head of state.

She took the oath of office within two hours of the impeachment vote, donning the presidential sash in front of Congress and vowing to serve out the rest of Mr Castillo’s term, until July 2026.

In her first words as president, Ms Boluarte called for “national unity” and urged lawmakers to put aside their ideological differences, in a tacit reference to the confrontation between Mr Castillo’s leftist government and the right-wing dominated Congress.

The 60-year-old lawyer will now form her first ministerial cabinet, an early indication of whether she is likely to survive in office.

Earlier in the day, Mr Castillo had faced his third impeachment attempt since the former rural schoolteacher unexpectedly won power from Peru’s traditional politicians.

According to a police report published by local media, Mr Castillo had left the presidential palace after the vote with the intention of seeking asylum in Mexico’s embassy before he was arrested.

Authorities said they had caught him red-handed staging a power grab.

Meanwhile, Hundreds of protesters, some of whom supported the former president and others opposed him, took to the streets of the national capital, Lima, after his impeachment .