Peru is mired in a long-standing clash between its independent state powers. Castillo has previously said the legislature and the attorney general have attempted coups against him through impeachment attempts and criminal investigations, respectively.

Castillo reshuffled cabinet just before midnight on Thursday, after Congress rejected his request for a confidence vote, claiming legal requirements were not met to hold it.

The confidence vote request was meant to pressure Congress with high-stake consequences including firing Cabinet and dissolving parliament.

Castillo said denying the request was similar to Congress holding a no confidence vote and accepted his prime minister's resignation on Thursday.

"There is an executive coup underway to shut down Congress," conservative lawmaker Carlos Anderson told Reuters on Castillo's comment.

According to the Constitution, if Congress issues a vote of no confidence, the entire Cabinet should resign. If Congress then issues a second no confidence vote, the president is entitled to dissolve parliament and call for legislative elections.

"It is what the President is openly seeking," legislator and retired military officer Roberto Chiabra, of the conservative Alliance for Progress party, told Reuters.

Outgoing Prime Minister Anibal Torres has denied that the confidence vote request was intended to shut down Congress.

Castillo has survived two impeachment attempts and right-wing opposition legislators are scrambling for support to launch a new impeachment trial against him, though they have acknowledged they do not have sufficient votes.

In 2019, centrist President Martin Vizcarra dissolved Congress after two votes of no confidence in an intense spat with the opposition. The following year, a new Congress ousted Vizcarra amid allegations of corruption.

(Reporting by Marco Aquino; Writing by Steven Grattan; Editing by Josie Kao)

By Marco Aquino