RIO DE JANEIRO — BRAZIL took a major step toward the impeachment of President Dilma Rousseff on Sunday when the lower house of Congress voted to send her case to the Senate, which will almost certainly refer her for a trial. It now looks likely that the president will be removed from office and replaced by Michel Temer, her vice president. Ms. Rousseff’s supporters are furious, her opponents are overjoyed, and Brazil’s corrupt politicians are breathing a sigh of relief.

In the hourslong televised session on Sunday, members of Congress explained their decisions as they voted for impeachment: They voted “for peace in Jerusalem,” “for the truckers,” “for the Free Masons of Brazil” and “because of the Communism that threatens this country.” Very few members of congress based their votes on the charges that have actually been brought against the president: that she violated regulations regarding public finances.

Those in the opposition claim that they want to send a message about good governance. But the real reason the president is being impeached is that the Brazilian political system is in ruins. Her impeachment will provide a convenient distraction while other politicians try to get their own houses in order.

An enormous corruption investigation, known as Operação Lava Jato, or Operation Car Wash, has exploded in the political system’s face. At first, when the investigation began in 2014, investigators accused members of Ms. Rousseff’s left-wing Workers Party of using Petrobras, the state-run oil company, to trade kickbacks for political favors. There is more and more evidence that this kind of practice was common among Brazilian political parties. The investigation has expanded to include a host of figures across the political spectrum, including roughly 50 politicians and a handful of business leaders.