Peru’s government is in the midst of a political crisis Tuesday after its president dissolved the country’s congress for failing to support his anti-corruption reforms – only for lawmakers to respond by suspending him from office and appointing his vice president as their new leader.

President Martín Vizcarra’s actions against the opposition-controlled congress were met with cheers early Tuesday morning by thousands of people who took to the streets of its capital, Lima, waving Peruvian flags, chanting and carrying signs with phrases like "Get out, corrupt politicians!"

Others tried to force their way into the legislature to get lawmakers out, but were driven back by police with tear gas.

"We are making history that will be remembered by future generations," Vizcarra said in a national address Monday evening. "And when they do, I hope they understand the magnitude of this fight that we are in today against an endemic evil that has caused much harm to our country."

Peru's President Martin Vizcarra delivers a national message from the government palace in Lima, Peru, on Monday. (AP/Peruvian presidential press office)

Nearly every living Peruvian ex-president has been implicated in a graft scandal centered around Odebrecht, the Brazilian construction giant that has admitted to dolling out millions of dollars to politicians around Latin America in exchange for lucrative public works contracts, the Associated Press reports.

PERU'S FORMER PRESIDENT ALAN GARCIA SHOOTS HIMSELF TO AVOID ARREST AMID CORRUPTION ALLEGATIONS

Vizcarra, who used to be Peru’s vice president, rose to the presidency last year after President Pedro Pablo Kuczynski resigned following revelations that his private consulting firm had received undisclosed payments from Odebrecht.

Opposition leaders on Monday denounced Vizcarra’s move to dissolve congress as the work of a "dictator," refusing to leave the building and instead approving a resolution to suspend Vizcarra for "breaking the constitutional order,” according to the Associated Press. They swore in Mercedes Aráoz, the vice president who recently broke with Vizcarra over his push to hold early elections next year.

But the lawmakers' acts likely carry only symbolic weight since congress is considered vacated.

"I know many Peruvians are upset," said Aráoz, who was greeted by applauding lawmakers singing the national anthem. "I share that anger but the solution for a crisis like this is not irresponsible gestures."

Demonstrators who had gathered to protest lawmakers pushing forward a vote to select an almost-full slate of new magistrates to the Constitutional Tribunal, continue outside Congress after President Martin Vizcarra dissolved the legislature in Lima, Peru, on Monday. (AP)

PERU STARTS DEMANDING PASSPORTS, VISAS FROM VENEZUELANS

Vizcarra recently criticized lawmakers for rushing to a vote on replacing six of the seven magistrates on Peru’s Constitutional Tribunal, which is expected to decide several important cases in the months ahead.

Though the terms for all six magistrates had expired, Vizcarra, legal observers, and human rights organizations criticized the congressional action for its speed and lack of transparency. The newspaper El Comercio reported Monday that six of the candidates up for consideration are facing potential criminal or civil charges for offenses including kidnapping, extortion and sex abuse.

Peru's judicial system is notoriously corrupt, the Associated Press reported, with judges caught on wiretaps negotiating deals on sentences for serious crimes.

MAN OUTSIDE UK PARLIAMENT IS 'RUGBY TACKLED' AFTER DOUSING HIMSELF IN 'FLAMMABLE LIQUID', POLICE SAY

Vizcarra had warned he would dissolve congress if legislators went ahead with the magistrate votes before weighing his own proposal for reforming how magistrates are selected. But lawmakers – prior to the dissolution of Congress – pushed forward in defiance Monday, accusing Vizcarra of blocking what should be a "simple procedure" conducted in accordance with the law.

One of the cases those magistrates are expected to rule on is a habeas corpus request to free Keiko Fujimori, the leader of the congressional majority right-wing Popular Force party who currently is being held as prosecutors investigate her for allegedly laundering money from Odebrecht. She is the daughter of former Peruvian President Alberto Fujimori, who was convicted of several cases of embezzelment and bribery.

Vizcarra, the BBC reports, has accused his party of trying to block corruption investigations by stalling his proposed reforms.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

"The parliamentary majority resorts to innumerable arguments and tricks, destined to harm not just government but society as a whole," the network quoted him as saying during his address.

So far, Peruvian authorities appear to be fully behind Vizcarra. His press office has released an image of him meeting with the heads of the army, navy, air force and police at the presidential residence in Lima.

The Associated Press contributed to this report.