President Dilma Rousseff was re-elected in one of the tightest and most bitterly-fought Brazilian presidential elections in the country's history.
The results were confirmed to Anadolu Agency by the Supreme Electoral Court on Sunday evening.
With nearly 99 percent of votes counted in the second-round vote, Rousseff has 51.5 percent, beating rival Aécio Neves, who received 48.5 percent.
Rousseff's victory means her governing Workers' Party (PT) is set to remain in power until 2018 after coming to power 12 years ago.
Some 142.8 million people were eligible to vote in Sunday's compulsory election, but around 21 percent abstained from the vote, and more than 6 percent of voters decided to cast a blank or void ballot.
A fast result was delivered by the country's pioneering electronic voting system.
Rousseff had been leading Neves, her runoff rival from the Brazilian Social Democracy Party (PSDB), by a small margin in polls ahead of Sunday's vote, but the final result proved even closer than had been predicted.
The campaign was marked by personal attacks and accusations of corruption, and was widely considered the "lowest, dirtiest" in Brazilian history.
The incumbent's second term is the maximum permissible under Brazilian law, and speculation has already begun as to whether her predecessor Luiz Inácio Lula da Silva will return in four years' time.
Keep up to date with what’s happening in Turkey,
it’s region and the world.
You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.