Sao Paulo, Brazil (CNN) -- Brazil's presidential vote is headed for a runoff.
Preliminary election results from the South American country show President Dilma Rousseff in the lead. But she didn't get the majority necessary to win in the first round.
With more than 99% of votes counted, Rousseff had 41.56% of votes, Brazil's Supreme Electoral Court said. Aecio Neves was in second place with 33.60%. And Marina Silva was in third place with 21.30%.
Exit polls Sunday indicated there would be a runoff between Rousseff, the incumbent, and Neves, a center-right candidate. In a poll conducted by the Ibope public research firm, Rousseff won 44% of votes, Neves won 30% and Silva won 22%.
Silva, an environmentalist candidate for the Brazilian Socialist Party, had gained momentum and backing from a growing number of supporters leading up to the vote, with polls before the election placing her in second place.
She joined the race after candidate Eduardo Campos died in a plane crash and was seen as a political outsider who could combat corruption. But while she succeeded in gaining much broader support that polls had initially predicted for her party, her third-place finish puts her out of the running for the presidency.
Rousseff, 66, was once a Marxist rebel who was allegedly tortured in the early 1970s during Brazil's former dictatorship.
With her trademark pixie-short hair style and thick glasses, she became one of most Brazil's most wanted fugitives, branded by some as a "subversive Joan of Arc."
She has a solid track record in running the executive office. Before becoming the country's first female president in 2011, Rousseff, from the Workers' Party, was chief of staff to former President Lula da Silva.
She democratized Brazil's electricity sector through the "Luz Para Todos" (Light for All) program, which made electricity widely available, even in rural areas.
Rousseff presided over the soccer World Cup in Brazil, but she took a lot of political flack over how public money was spent.
Streets filled with hundreds of thousands of demonstrators questioning the morality of pumping so much money into stadiums instead of programs to fight poverty and build infrastructure.
Rousseff defended the spending, saying the vast majority of funds earmarked for infrastructure projects were spent on projects for the nation, not the soccer tournament.
And Rousseff claims that under the presidencies of her predecessor and herself, masses of Brazilians have risen out of poverty.
"We have also mainstreamed into the middle class no less than 42 million people," she has said.
But inflation is now weighing down that progress.
Neves, a 54-year-old economist, is a well-known name and a career politician. His campaign slogan promises reforms to lower inflation and encourage more investment in the country: "The sure path for Brazil to really change."
The pro-business candidate belongs to the Brazilian Social Democratic Party, one of the country's strongest.
His grandfather, Tancredo Neves, was elected to become Brazil's president in 1985 but died before taking office. Neves says he began his political career campaigning at his grandfather's side.
"What motivates me in politics is an enormous love of Brazil, a limitless desire to see things improve, to see Brazil go the right way," he says in a campaign video.
While he'd been trailing in some polls leading up to the election, Neves said the only poll that mattered was Sunday's official vote.
"Let's get to the second round," he said in a YouTube video on Saturday.
Both Rousseff and Neves thanked supporters in speeches Sunday night.
Rousseff has promised her second term will be different, running under the slogan of "New Government, New Ideas."
"Once again, the people have honored me with their trust by giving me victory in the first round," she said.
A video posted on Neves' Twitter feed Sunday night showed cheering supporters carrying him as cameras flashed.
This has been one of the tightest election competitions in recent years, and it's likely to intensify in the coming weeks, with both candidates vying for the votes that went to Silva in the first round.
There will be three more weeks of campaigning before the runoff.
CNN's Shasta Darlington reported from Sao Paulo. Catherine E. Shoichet and Ben Brumfield reported and wrote from Atlanta.