Peru's Congress has sworn in a new president in a day of sweeping political drama that saw the former leader, Pedro Castillo, ousted in an impeachment trial hours after he attempted a last-ditch bid to stay in power by trying to dissolve Congress.

Ignoring Mr Castillo's attempt to shut down the legislature by decree, lawmakers moved ahead with the previously planned impeachment trial, with 101 votes in favour of removing him, six against and ten abstentions.

The result was announced with loud cheers, and the legislature called Vice President Dina Boluarte to take office.

Ms Boluarte was sworn in as president through 2026, making her the first woman to lead Peru. She called for a political truce to overcome the crisis and said a new cabinet inclusive of all political stripes would be formed.

She lambasted Mr Castillo's move to dissolve Congress as an "attempted coup".

Peru's national police shared an image on Twitter of Mr Castillo sitting unrestrained at a police station after the vote to remove him and said that it had "intervened" to fulfill its duties. It was unclear if he had been detained.

Mr Castillo earlier had said he would temporarily shut down Congress, launch a "government of exception" and call for new legislative elections.

Ousted president Pedro Castillo

That sparked resignations by his ministers amid angry accusations from both opposition politicians and his allies that he was attempting a coup. The police and Armed Forces warned him that the route he had taken to try to dissolve Congress was unconstitutional.

Some small, fairly subdued street protests took place. In Lima, dozens of people waving Peruvian flags cheered Castillo's downfall, while elsewhere in the capital and in the city of Arequipa his supporters marched. One held a sign saying: "Pedro, the people are with you."

The Government Palace and Congress in Lima were surrounded by metal barricades and dozens of police officers donning shields and plastic helmets.

Peru has gone through years of political turmoil, with multiple leaders accused of corruption, frequent impeachment attempts, and presidential terms cut short.

The latest legal battle began in October, when the prosecutor's office filed a constitutional complaint against Castillo for allegedly leading "a criminal organisation" to profit from state contracts and for obstructing investigations.

Congress summoned Castillo last week to respond to accusations of "moral incapacity" to govern.

Mr Castillo has called the allegations "slander" by groups seeking "to take advantage and seize the power that the people took from them at the polls".

The leftist teacher-turned-president had survived two previous attempts to impeach him since he began his term in July 2021.

But after today's attempt to dissolve Congress his allies abandoned him and regional powers underlined the need for democratic stability.

"The United States categorically rejects any extra-constitutional act by President Castillo to prevent Congress from fulfilling its mandate," the US ambassador to Peru, Lisa Kenna, wrote on Twitter.

The turmoil rattled markets in the world's number two copper producer, though analysts said that the removal of Mr Castillo, who has battled a hostile Congress since taking power, could be a positive for investors.

Peru's sol currency fell over 2% against the dollar at its session low before recovering slightly to trade down 1.4%.

"Peru's financial markets will suffer, but won't collapse, thanks mainly to solid domestic fundamentals," said Andres Abadia at Pantheon Macroeconomics.