After a contentious campaign, Brazilian polls opened amid tight security Sunday as voters headed out to elect their next president.
Some 143 million people in the world's seventh-largest economy were choosing between leftist incumbent Dilma Rousseff, who final opinion polls showed had a narrow edge, and Social Democrat Aecio Neves, scion of a famous political family.
Polls gave Rousseff between a four- and six-percent lead over her rival, though the election remained too close to call.
Winning back front-runner status after trailing Neves after the first round has been a battle for Rousseff, a former guerrilla once jailed and tortured for fighting the country's 1964-1985 military regime.
"We are voting for a more equal Brazil with more opportunities," said Rousseff, Brazil's first woman president, as she cast her vote in the southern city of Porto Alegre where she grew up, after polls opened at 1000 GMT.
Sunday's vote was widely seen as a referendum on 12 years of government under her Workers' Party (PT) -- eight under working-class hero Luiz Inacio Lula da Silva and four under Rousseff, who has presided over four years of anemic growth culminating in recession.
The PT has endeared itself to the masses, particularly in the impoverished north, with landmark social programs that have lifted some 40 million people from poverty, increased wages and brought unemployment to a record-low 4.9 percent.
However, Rousseff has presided over rising inflation and a recession this year. She also faced massive protests last year against corruption, record spending on the World Cup, and poor services, notably education, health care and transport.
Rousseff must also ride out a multi-billion-dollar embezzlement scandal implicating dozens of politicians -- mainly her allies -- at state-owned oil giant Petrobras.
Rightwing news magazine Veja on Friday quoted a suspect in the case as saying Rousseff and Lula personally knew of the scam. She roundly denied the claim and threatened to sue.