Brazilian President Dilma Rousseff was re-elected on the narrowest of margins on Sunday, winning a second term on a platform of expanding social programs and further reducing inequality.
Ms. Rousseff won a fourth term for her left-wing Workers' Party with 51.6 per cent of votes against 48.4 for her right-of-centre challenger Aecio Neves.
Ms. Rousseff swept some regions – particularly in the poor northeast – and lost badly in others, such as the capital, Brasilia, and the country's largest and most prosperous state, Sao Paulo. Mr. Neves, the scion of an elite political family, swept the conservative and developed south of the country.
"Brazilian society hasn't been this divided since 1989," the year of the first democratic election after the dictatorship, said Maria do Socorro Braga, a professor of political science at the Federal University of Sao Carlos in Sao Paulo. "The numbers are extremely close. Half the country believes that the party that has stayed in power is the best, but we know that even those who voted for them are critical of the government on corruption and the economy – and the other half doesn't accept this government."
In her acceptance speech, Ms. Rousseff struck an unusual note of conciliation and humility: "My first commitment in this second term is dialogue," she said. "Re-election is a vote of hope – especially that we will govern better – that's what I heard from the ballot box. I want to be a much better president than I was before."
And she insisted the country could unite around the results. "From the bottom of my heart, I don't believe that these elections have divided the country. They stirred up a surge of ideas and emotions that sometimes seem contradictory but have a common motive, the search for a better future for the country."
But challenges await her: First, and quickly, Ms. Rousseff will have to alter her economic policy because she has been openly repudiated by the business sector. "Because it was so tight, she's going to have to open up and listen to them, add their demands to their program," Prof. Braga said.
Ms. Rousseff has said she will change her finance minister, but refused to name a new candidate thus far. There is speculation she may do so overnight, so that a business-friendly minister is in place when the markets open on Monday, to avert the dive that was seen when she pulled ahead in polls a few weeks ago.
On her watch, Brazil's once vibrant economy has stalled and lately slipped into recession, while inflation has crept steadily up.
Ms. Rousseff is also going to have to accommodate the hard-left of her party – from which she had distanced herself in her first term, but whose shoe-leather campaigning played a critical role in getting her elected – and also young people who are loyal to the party but are demanding better public services.
She faces the challenging task of trying to cobble together a governing coalition in a congress that contains 28 different parties, but she may get a boost from the fact that many will want the privileges that come with joining the party in power.
"I think the fact that people have decided to leave the [Workers' Party] in power for 16 years, double what the opposition had, means she's going to be a very strong president with a lot of legitimacy," said Antonio Carlos Alkmim, a political scientist with the Pontifical Catholic University in Rio de Janeiro.
"Her great challenge will be to fix problems with management of the economy and corruption, her two points of weakness in this election," he added.
A still-unfolding corruption scandal at the national energy company Petrobras – and how much Ms. Rousseff knew about alleged embezzlement – emerged as a critical issue in the last days of the campaign.
Many voters demonstrated their frustration with the choice of candidates: More than 20 per cent opted not to vote at all (although voting is mandatory and those who cannot produce a valid excuse must pay a fine) and seven million people cast blank or nullified votes. "These two, they are just two faces on the same puppet, they both work for the people who have the money and control everything in this country," said Leonardo Nunes, a construction worker in the city of Niteroi who did not vote. "Neither one is going to do anything different."
Mr. Neves' Brazilian Social Democratic Party had the solid support of Brazil's private sector and its upper middle class. "I'm in favour of power of changing hands, because the perpetuation of the same government for so many years creates the space for the corruption scandals we're seeing now," said Anna Frota, 41, a public servant who voted in the leafy Rio neighbourhood of Gavea. "I disagree with the way the [Workers' Party] is friendly with countries that are dictatorships like Cuba and Venezuela. And I disagree with the way they manage the economy."
But in the end it was the 30 million Brazilians who have seen their lives improve dramatically under successive Workers' Party governments whose votes carried the day. "I'm voting for Dilma because everything got more accessible during the last few years," said Willians Dias, 42, who parks cars and collects rubbish in Rio. "Now poor people can have phones, they can have cars: I got two jobs and I managed to buy my house. Before it was much more difficult to get a job and to buy things."
Ms. Rousseff, an economist from the central state of Minas Gerais, was a clandestine Marxist guerrilla who fought the dictatorship in the 1970s. She was caught and brutally tortured by the military. With the return to democracy, she became a civil servant and rose to manage energy policy in the southern state of Rio Grande de Sul, where her skills caught the eye of former president Luiz Inacio Lula da Silva, who made her his minister of mines and energy. She had never fought an election until she won power in 2010.