"I will know how to honour his legacy," she told cheering supporters. "I will know how to consolidate and go forward with his work."

Ms Rousseff, a former Marxist guerrilla who was jailed and tortured in the 1970s under Brazil's military dictatorship, warned that Brazil could not rely on developed economies to help it grow after the global financial crisis.

But she sought to qualm fears that she could increase public spending and risk a return to high inflation by saying that the Brazilian people would not accept "governments who spend above what is sustainable".

"We will take care of our economy with all responsibility," Ms Rousseff said.

Brazil's GDP is likely to grow by 7.6 per cent this year, falling to 4.5 per cent next year, according to figures released by the country's Central Bank on Monday.

The country's Bovespa stock exchange rose in early trading, indicating that investors were not taking flight at the defeat for Mr Serra, of the centrist Brazilian Social Democracy Party (PSDB).

Ms Rousseff also vowed to make equality for women her first priority and to continue with the social programmes aimed at eradicating poverty introduced under President Lula.

"I would like very much today for fathers and mothers of daughters to look in their eyes and tell them: 'Yes, a woman can,'" she said.

Ms Rousseff will lead a 10-party alliance brought together by the negotiating skills of President Lula, whom has approval ratings of around 80 per cent.

But much of the Brazilian media see the election result as an endorsement of President Lula's reign rather than a sign that Ms Rousseff, who has never before held elected office, is viewed by voters as the best person to lead the country.

The front page headline of the newspaper O Estado de Sao Paulo called the result simply "The Victory of Lula".

The weekly political magazine Veja asked on its last front cover before the election: "He is leaving the presidency but will the presidency leave him?" Many political analysts believe the outgoing president could seek a return to power in 2014 if Ms Rousseff fails to throw off her reputation as a stern technocrat and develop into a political leader.

Professor Mark Jones, of the department of political science at Rice University in Texas, said: "I am certain that he will work behind the scenes to assist Dilma Rousseff's presidency. If her presidency is mediocre or unsuccessful then it would not surprise me if Lula stepped in to run for office again."

Professor Jones suggested that the outgoing president could also be a candidate to replace Nestor Kirchner, the former president of Argentina who died last week, as General Secretary of the Union of South American Nations.

Ms Rousseff is now due to rest for a few days before flying to Mozambique with President Lula on Saturday. They will then go on to South Korea for G20 meetings.