Brazil’s lower house has voted to start impeachment proceedings against President Dilma Rousseff over charges of manipulating government accounts.
The “yes” camp won more than a required two-thirds majority after a lengthy session in the capital Brasilia.
The motion will now be sent to the upper house, the Senate, which is expected to suspend Ms Rousseff while it carries out a formal trial.
She denies the charges, and accuses her opponents of mounting a “coup”.
Brazil’s governing Workers’ Party said “the fight continues now in the Senate”.
Mr Rousseff’s opponents secured 367 votes in parliament – exceeding the 342-vote mark needed to send the motion to the Senate.
The “no” camp secured 167 votes, while seven other deputies abstained. Two deputies were not present during the voting.
Voting began after passionate statements from MPs and party leaders in a session broadcast live on television as well as on large screens in city centres.
Defending Ms Rousseff, Afonso Florence, of the Workers’ Party, urged MPs to have a “democratic conscience”, and attacked her opponents who are facing their own charges of corruption.
Pro-impeachment MP, Antonio Imbassahy of the PSDB party, told lawmakers to “choose the country that we want from now on”, and said Brazil needed “moral reconstruction.”
If the Senate finds Ms Rousseff guilty, she can be removed from office permanently. She has two opportunities to appeal during the whole process.
Read more on Brazil’s political crisis:
- Could Rousseff be impeached?
- Where did it all go wrong for Rousseff?
- A critical month ahead
- What has gone wrong in Brazil?
- Rousseff faces a perfect storm
Hundreds of thousands of protesters watched the voting marathon on huge TV screens in cities across the country – Ms Rousseff’s supporters wearing red and her opponents wearing the green-and-yellow of the Brazilian flag.
Some 25,000 protesters from both sides were outside the Congress building – separated by a 2m (6.5ft) high wall, that stretches for 1km (0.6 miles).
The “yes” camp burst into celebrations even before the two-thirds of the votes were secured.
The atmosphere has so far been peaceful; almost festive with music, fancy dress and people blowing trumpets and vuvuzuelas.
The 68-year-old president has vigorously denied any wrongdoing, and on Saturday wrote in one newspaper her opponents “want to convict an innocent woman and save the corrupt”.
The BBC’s Wyre Davis in Brazil says Ms Rousseff is an unpopular leader in a country facing a severe economic crisis.
She is accused of juggling the accounts to make her government’s economic performance appear better than it was, ahead of her election campaign two years ago – charges she vigorously denies.
But her supporters say many of the congressmen who are sitting in judgement have been accused of far more serious crimes.
If she is impeached, Vice-President Michel Temer would take over as interim president, but he is also facing impeachment proceedings over the same allegations as Ms Rousseff.
Ms Rousseff accused him this week of being one of the ringleaders of the “coup” attempt against her.
She has also indicated lower house speaker Eduardo Cunha – who would be second in line to replace her – is among those trying to oust her. He is being investigated over allegations of taking multi-million-dollar bribes.
Next in line to replace her is Renan Calheiros, head of the Senate. But he, too, is under investigation in connection with a massive corruption scandal at state-oil company Petrobras.
All three are from the PMDB – the largest party in the coalition, which abandoned Ms Rousseff in recent weeks to support the impeachment. They deny the allegations against them.
513 members of the lower house of Congress
342 votes needed to move process to the Senate
41 senators out of 81 must vote in favour to begin impeachment trial
180 days she could be suspended for during the hearings
What happens next?
Lower house vote: An impeachment vote is due in the lower house on Sunday. A two-thirds majority is required for it to go forward to the Senate.
Senate vote on trial: If Ms Rousseff case is sent to the Senate, a simple majority is enough to suspend her for up to 180 days while she is put on trial. Vice-President Michel Temer would step in during this period.
Impeachment vote: For Ms Rousseff to be removed from office permanently, two-thirds of the Senate would have to vote in favour. Mr Temer would remain president for an interim period should this happen.