Brazil's lower house has voted to start impeachment proceedings against President Dilma Rousseff over charges of manipulating government accounts.
The "yes" camp comfortably won the required two-thirds majority, after a lengthy session in the capital.
The motion will now go to the upper house, the Senate, which is expected to suspend Ms Rousseff next month while it carries out a formal trial.
She denies tampering with the accounts to help secure her re-election in 2014.
The ruling Workers' Party has promised to continue its fight to defend her "in the streets and in the Senate".
Trumpets and vuvuzelas
Ms Rousseff's opponents secured 367 votes in the lower house - 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".
A 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 votes for impeachment, Ms Rousseff will be put on trial in the upper chamber and will be removed from office permanently if found guilty. She has two opportunities to appeal during the whole process.
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 makeshift 2m (6.5ft) high metal wall, that stretches for 1km (0.6 miles).
The "yes" camp burst into celebrations even before the two-thirds of the votes had been secured, Foreign media reports.