Peruvian president Martín Vizcarra has dissolved Congress to end a year-long battle with rightwing lawmakers over his anti-corruption campaign, but rebel legislators refused to leave the chamber as protests against them started across the country.

Peru’s worst political crisis in two decades threatens unrest in the South American country and could bring lawmaking to a halt.

“Peruvian people, we have done all we could,” Vizcarra told the nation in a televised message. He vowed to call new legislative elections to let voters weigh in on a dispute he says has stymied his bid to stamp out graft in the ruling class.

Opposition representatives cried “Dictator” after Vizcarra invoked a constitutional article allowing presidents to dissolve Congress. The chamber immediately voted to declare him temporarily suspended, naming vice president Mercedes Araoz to replace him.

But a government source said their efforts were void, since Congress was already officially closed.

Martín Vizcarra announces the dissolution of Congress on Monday night. Photograph: Juan Pablo Azabache/AFP/Getty Images

Vizcarra accused Popular Force, the opposition majority party led by jailed former presidential candidate Keiko Fujimori, of trying to use democratic institutions for personal gain.

The party has dragged its feet on passing his anti-corruption reforms and last week shelved his bill for a snap general election to end the impasse.

The last straw, Vizcarra said, was Congress’ appointment on Monday of a new member to the top court, the constitutional tribunal, which would be the likely referee in a legal dispute between Congress and the government.

Proposed nominees for up to six of the tribunal’s seven members had drawn fire for links to criminally suspect judges.

“What happened in Congress underscores the shamelessness to which the parliamentary majority has fallen,” Vizcarra added.

Peru’s mining-powered economy has largely shrugged off increasing bouts of political turmoil in recent years, including the resignation last year of former president Pedro Pablo Kuczynski in a clash with Popular Force.

Kuczynski and Peru’s three other most recent presidents have been ensnared in a massive bribery scandal involving Brazilian builder Odebrecht.

Fujimori, the daughter of former authoritarian president Alberto Fujimori, is in pre-trial detention in a case related to Odebrecht.

Protesters gathered outside Congress in Lima on Monday night to pressure lawmakers to leave, while police in riot gear stood by. Domestic media said protests in support of Vizcarra had also started in other cities across the country.

Most Peruvians in recent opinion polls have expressed support for the dissolution of Congress. Vizcarra is often greeted on the streets with shouts encouraging the move.

Peru’s constitution allows presidents to dissolve Congress to call new elections if lawmakers deliver two votes of no-confidence in a government. The current Congress has already voted once that it had no confidence in the government.

Vizcarra said he counted Congress’ appointment of a new member to the constitutional tribunal as a second vote of no-confidence.

But lawmakers, who voted to renew their confidence in his government on Monday, said he had overstepped constitutional limits by overriding Congress’ powers to appoint tribunal judges.

“Vizcarra and his ministers will end up in jail. We will end up in history!” said former congressman Jorge del Castillo.