Updated

For the second time in under a quarter century, Brazil's Chamber of Deputies voted to open impeachment proceedings against a democratically elected leader, dealing a devastating blow to President Dilma Rousseff, whose left-leaning Workers' Party came to power 13 year ago on the promise of improving the lot of the poor.

The 367-137 vote late Sunday in favor of impeachment was well over the 342 votes needed for the proceedings to move ahead to the Senate, where a majority vote will determine whether Rousseff is put on trial and suspended while Vice President Michel Temer temporarily takes over. The exact date of the Senate vote is not known, but it's widely expected by the middle of next month.

That throws the country's political landscape into confusion as Brazil prepares to host the Olympic Games in August.

The vote in the lower house sparked elation among many Brazilians who hold Rousseff responsible for everything from the devastating recession to chronic high taxes and poor public services. At the same time, a broad swath of the population was deeply upset by the results, which many decried as anti-democratic.

"I'm happy because I think Dilma had to go, but I'm also both sad that it came to this and also really worried that the next president could be even worse," said Patricia Santos, a 52-year-old small business owner who was among an estimated nearly 60,000 pro- and anti-impeachment demonstrators who outside Congress. "I quiver to think what awaits us next."

While Rousseff herself didn't react to the results, her party's leader in the lower house, Jose Guimaraes, acknowledged the battle had been lost, but insisted the war was just beginning.

"The putchists won in the Chamber of Deputies. . We can turn it over in the Senate," he said. "We're going to continue to fight because we don't back down and we aren't going to let ourselves be beat by this momentary loss."

Solicitor General Jose Eduardo Cardozo said after the vote that Rousseff would not resign and that she would address the situation Monday. He also hinted an appeal could be filed with the Supreme Federal Tribunal, Brazil's highest court.

Sunday's vote came about 24 years after the lower house opened impeachment proceedings in 1992 against Fernando Collor de Mello, Brazil's first democratically elected president after more than two decades of military rule. Collor faced corruption allegations and ended up resigning before the conclusion of his impeachment trial in the Senate.

Rousseff has been accused of violating fiscal laws by using sleight-of-hand accounting to maintain government spending. Noting she hasn't been accused of any crime, she insists the impeachment is a "coup" and has pledged never to resign.

Rousseff's foes maintain the budget maneuvers were a bid to shore up popular support as Brazil plunged into the worst recession in decades.

Rousseff says previous presidents used the same accounting maneuvers without repercussions and insists the allegations are little more than a flimsy excuse by Brazil's traditional ruling elite to snatch power back from the Worker's Party, which has governed since 2003.

Luciano Dias, a Brasilia-based political consultant, said ultimately Rousseff "made the same mistakes that former President Fernando Collor made."

"She took too many resources from the private sector, she was arrogant with Congress for a long time and her economic policies were just wrong," he said.

Rousseff, a one-time guerrilla fighter who was tortured under the military dictatorship, was hand-picked by charismatic former President Luiz Inacio Lula da Silva to succeed him — becoming Brazil's first woman president. But seven years of galloping economic growth under Silva began to flag after she took office in 2011, and she narrowly won re-election in 2014 after widespread nationwide protests a year earlier. Her popularity rating has plunged in step with the tanking economy, and opinion polls suggest a majority of Brazilians support her ouster, though many appear to have reservations about those in line to replace her.

Temer, the vice president, has been implicated in the investigation into a mammoth corruption scheme centered on the state-run Petrobras oil company. He also could conceivably also face impeachment proceedings because he signed off on the some of the same fiscal maneuvers as Rousseff.

The second in line to replace Rousseff, Chamber of Deputies Speaker Eduardo Cunha, has been charged with taking $5 million in bribes in the Petrobras scheme.

Cunha was the driving force behind the impeachment proceedings — an irony that was not lost on the government camp.

"My God, what hypocrisy. It's not Dilma who should leave the (presidential) palace. You, Eduardo Cunha, should not be in that seat," lawmaker Moema Gramacho of the Workers' Party said as she proclaimed her "no" vote.

Asked whether he was happy with the results, Cunha said, "All of this is very sad, very serious."

"The president lost the ability to govern a while ago . she fell to the bottom of the well," Cunha said, adding, "Now Brazil has to get out of the well."

A circuslike atmosphere reigned on the floor of the house during the six-hour vote. Lawmakers sporting Brazilian flag capes and red sashes jostled, jeered, cheered, chanted and snapped endless selfies as they picked their way through the packed crowd to the microphone to proclaim their votes.

Impeachment supporters invoked God, family and Brazil to justify their votes, often saying impeachment would help put an end to endemic corruption in the country.

"I want tomorrow to be a new day for this country, a new day of hope," said Odelmo Leao of the Progressive Party. "God bless. My vote is yes."

Rousseff's supporters said it was a blow for the poor — an estimated 30 million of whom were lifted out of destitution, thanks in part to the Workers' Party's wealth redistribution programs.

"This is a coup against the poor, a coup against social programs," said Workers' Party legislator Patrus Ananias.

Robert Silva, who was collecting empty cans at the pro-impeachment rally in front of Congress, said he didn't think anything that happened within its halls would improve his lot much.

"With Dilma, my life is like this," he said, gesturing to his shopping cart filled with crumpled aluminum cans. "I just hope with whoever's next it won't get worse."