Peru's Congress voted to oust President Pedro Castillo in an impeachment trial on Wednesday, just hours after he plunged the country into a constitutional crisis by attempting to dissolve the legislature by decree.

That morning, he announced he would temporarily shut down Congress and call for new elections - sparking allegations of a coup.

CASTILLO: "In response to citizens' demands throughout the length and breadth of the country, we have decided to establish an exceptional government aimed at re-establishing the rule of law and democracy"

Ignoring Castillo's attempt, lawmakers moved ahead with the previously planned impeachment trial, with 101 votes in favor of removing him, six against and 10 abstentions.

The result was announced with loud cheers and the legislature called Vice President Dina Boluarte to take office - who was later sworn in as interim president.

The ex-president has since been detained by police and accused of the crime of "rebellion" for breaking the constitutional order. according to Peru's public ministry

Congress summoned Castillo last week to respond to accusations of "moral incapacity" to govern. The prosecutor's office in October filed a constitutional complaint against Castillo for allegedly leading "a criminal organization."

Castillo has called the allegations "slander."

The leftist teacher-turned-president had survived two previous attempts to impeach him since he began his term just over a year ago.

But after his announcement that he would dissolve Congress, allies abandoned him and his ministers resigned.

After Peruvian lawmakers voted to oust Castillo, demonstrators in the streets of Lima chanted, "we did it, we did it."

One protester telling Reuters that "as long as there's a brave and combative youth" the Peruvians "will have a government elected by the people."