Brazil's presidential election is to go to an October 31 runoff after the ruling party candidate, Dilma Rousseff, won elections but not by enough to avoid a second round, the High Electoral Tribunal said.

Rousseff won 47 percent of the ballots Sunday -- short of the absolute majority of 50-percent-plus-one-ballot required to obviate a knockout round against second-placed challenger, former Sao Paulo governor Jose Serra.

"We can confirm there will be a second round in the presidential elections," Ricardo Lewandowski, the president of the High Electoral Tribunal, told reporters in Brasilia.

An earlier report follows...

Polls closed in Brazil late Sunday in general elections expected to elevate ruling party candidate Dilma Rousseff to the presidency, to succeed outgoing leader Luiz Inacio Lula da Silva.

All pre-election surveys suggested Rousseff, 62, would romp home -- possibly even with a landslide big enough to avert an October 31 runoff against her nearest rival, former Sao Paulo state governor Jose Serra.

If confirmed, that would make her Brazil's first female president.

The country's 136-million-strong electorate was called out for the elections, which were also to choose federal and state deputies, most of the senate, and the governors of all 26 states. Voting is compulsory in Brazil.

Lula, Brazil's most popular president ever, is leaving office at the end of the year after serving the maximum two straight terms permitted under Brazil's constitution.

He threw his weight behind getting Rousseff elected, promising voters she would continue his policies that have brought prosperity to Latin America's biggest nation, which now counts as the world's eighth-ranked economy.

Lula was waiting on election results in his official residence in Brasilia, after having voted early in the day in his hometown of Sao Bernardo do Campo outside Sao Paulo.

The High Electoral Tribunal said no incidents of violence disrupting voting were reported during the day, though 650 people were arrested for illegally campaigning, trucking in voters or trying to buy votes. Forty-three of those detained were candidates for public office.

Torrential rain in some parts of Brazil made polling in those areas difficult, though solutions were found, it said.

Lula boasted after casting his ballot that Brazil "is living an extraordinary moment in consolidating democracy."

The national economy, booming thanks to financial stability, strong exports, soaring domestic consumption and poverty eradication overseen on his watch, was forecast to grow by more than seven percent this year.

The wildly popular, 64-year-old outgoing president said Rousseff, a former Marxist guerrilla who served as his energy minister then cabinet chief, will continue his policies.

That promise seemed good enough for most of the electorate, which was willing to overlook Rousseff's combative, sometimes dour demeanor in the hopes of extending Brazil's economic good fortune.

Preliminary results were expected later Sunday. Voting was carried out using electronic ballot machines which made counts lightning fast.

Lula hands over the reins to his successor on January 1, 2011.