Brazil's lower house of Congress is voting on whether to impeach President Dilma Rousseff over charges of manipulating government accounts for political gains - a claim she denies.
The "yes" camp is leading by a wide margin, as the vote reaches its final stage. To succeed, the motion needs a two-thirds majority - or 342 votes.
Ms Rousseff accuses her opponents of mounting a "coup".
Some 25,000 rival protesters are rallying outside Congress.
The lengthy session in the capital Brasilia has heard speeches from both sides.
With 400 of the 513 votes cast, 297 voted to impeach Ms Rousseff, 97 were against, four abstained and two were absent.
If the motion is approved by two-thirds it will be sent to the upper house, the Senate, which will consider the allegations of unlawful activity against her.
If the Senate finds Ms Rousseff guilty, she can be removed from office permanently. She has two opportunities to appeal during the whole process.
The result of the lower house vote may not be known for a while, as each member of the lower house is being given the opportunity to explain the decision they have made - as their vote is flashed up on screen.
Voting began after passionate statements from lawmakers and party leaders in a session that was disrupted as it got under way, and is being broadcast live on television as well as on large screens in city centres.
Defending Ms Rousseff, Afonso Florence, of her governing Workers' Party, urged lawmakers to have a "democratic conscience", and attacked her opponents who are facing their own charges of corruption.
Pro-impeachment lawmaker, Antonio Imbassahy of the PSDB party, told his colleagues to "choose the country that we want from now on", and said Brazil needed "moral reconstruction."
Read more on Brazil's political crisis:
Hundreds of thousands of protesters have gathered 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 have gathered outside the Congress building in Brasilia - separated by a 2m (6.5ft) high wall, that stretches for 1km (0.6 miles).
Reports say the atmosphere has so far been peaceful; almost festive with music, fancy dress and people blowing trumpets and vuvuzuelas.
Brazil's three main newspapers predict a narrow vote in favour of impeaching Ms Rousseff.
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 lawmakers 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.
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.