Dozens gathered outside the penitentiary centre where Castillo is being detained. 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.

Castillo, a former teacher and union activist who won a narrow victory in 2021 buoyed by poor rural and indigenous voters, faces separate corruption allegations simultaneously.

Outside Congress, protesters set barricades on fire and threw objects at police officers who responded by firing tear gas canisters into the crowds to disperse them.

The Andean country has suffered intense bouts of political instability in recent years, with five presidents in just the last five years, all unable to complete their elected terms. The 17-month tenure of the 53-year-old Castillo was marked by unprecedented turnover among his ministers, as well as multiple corruption scandals which he dismissed as politically motivated efforts by right-wing members of the opposition-controlled Congress set on undermining his government.