Brazil's presidential election will go to a second round after Workers' Party candidate Dilma Rousseff failed to win an outright victory in Sunday's voting.
With 98% of votes counted, Ms Rousseff, former Cabinet chief in the government of President Luis Ignacio Lula da Silva, has 47%; Social Democratic candidate Jose Serra is trailing on 33%. The two will contest a run-off vote in four weeks' time.
A strong showing by Green Party candidate Marina Silva, who polled 19%, may have cost Ms Rousseff a first-round win. Where Ms Silva's votes go will be crucial in the run-off.
Until just a few days ago, the BBC reports, a second round had seemed unlikely. But Ms Rousseff lost ground late in the campaign and Ms Silva, a devout Christian, enjoyed a late surge in support - some of which appears to have come from evangelical Christians concerned about Ms Rousseff's stance on abortion.
Addressing supporters, Ms Rousseff said she welcomed the opportunity to explain her policies in more detail.
"We are warriors, and we are accustomed to challenges," she said in a speech in Brasilia after the result was announced. "We do well in second rounds."
Once jailed for three years
Ms Rousseff, 62, served as Mr Lula's chief of staff from 2005 until this year, and is a career civil servant. This is her first attempt at elected office.
During the 1960s and 1970s she was involved in the armed struggle against Brazil's military rulers, and was jailed for three years.
Mr Serra, 68, is hugely experienced, having served as Sao Paulo mayor, Sao Paulo state governor and health minister under Mr Lula's predecessor, President Fernando Henrique Cardoso. He lost the presidential election in a run-off to Mr Lula in 2002.
Having served two terms, the popular Mr Lula cannot run for a third.