President Martín Vizcarra of Peru ordered Congress to dissolve on Monday night, prompting lawmakers to try to suspend him and plunging the nation into uncertainty after a grinding, yearslong corruption crisis.

Opposition lawmakers responded to the president’s decision by accusing Mr. Vizcarra of staging “a coup” and moved swiftly to suspend him for 12 months. They nominated his vice president, Mercedes Aráoz, as the new acting head of state.

“I accept this with fortitude,” Ms. Aráoz said before Congress of a provisional presidency. “It is one of the most difficult decisions I have made in my life.”

It was not clear whether Mr. Vizcarra would accept the lawmakers’ decision. Speaking in a nationally televised address earlier Monday night, Mr. Vizcarra said the drastic move to dissolve Congress was his last recourse to force new parliamentary elections, which have been repeatedly blocked by the opposition-controlled legislature.