In Brazil's most unpredictable election in decades, it was the candidate with the old-school family pedigree and a calm, presidential air who turned the race upside down with a dramatic late surge.

Stuck in third place and all but written off just a week ago, Senator Aecio Neves, 54, comfortably grabbed second place in the first round of voting on Sunday and will face President Dilma Rousseff in a runoff on Oct. 26.

He now has three weeks to convince voters who backed the candidates eliminated on Sunday that his brand of austere, pro-business policies are the best bet to lift Brazil from three-plus years of economic stagnation.

Neves' image as an insider from the biggest opposition force, the centrist Brazilian Social Democracy Party (PSDB), was a problem throughout much of the campaign.

Voters looking for change after four years of Rousseff's leftist rule threw their support behind a more novel candidate who promised a break with politics as usual - environmentalist Marina Silva.

But when attack ads and Silva's own unpredictable behavior hit her campaign, opposition voters went running back into the reassuring arms of Neves.

He won almost 34 percent of the vote on Sunday. He trailed Rousseff by around 8 percentage points so she is a slight favorite to win the runoff.

But recent polls showed that more than half of Silva's supporters would back Neves in the runoff, while only a quarter were leaning toward Rousseff and the rest were undecided or said they would spoil their ballots in protest. Silva had around 21 percent support in Sunday's election.

Neves started his political career at age 21 as an aide to his grandfather. Tancredo Neves was set to become president in 1985 as Brazil emerged from a dictatorship, but died of an infection before taking the oath of office.

He remains a popular figure. Aecio Neves still mentions him regularly and posted a photo of him on Facebook the night before the election.

Those deep political roots could still work against Neves. Both he and the PSDB, which last governed Brazilfrom 1995 to 2002, are widely perceived as elitist - a problem in a country where more than half of voters live in households earning less than $1,000 a month.

But for now, his broad party support and reputation as a skilled builder of coalitions have convinced many Brazilians that he is qualified to lead a continent-sized nation of 200 million people.

"Mine will be a government of predictability, because that will be essential for the market and investors to again be partners in our national development," Neves said on Saturday.

TIGHT GRIP ON FINANCES

A four-term congressman and two-term state governor before he entered the Senate in 2010, Neves' most notable accomplishment is implementing a policy known as "management shock" in Minas Gerais, Brazil's second most populated state.

By slashing some public salaries, taking a pay cut himself and cutting the number of government departments, Neves eliminated the state's deficit.

He says that paved the way for more investment and a World Bank loan that funded rural anti-poverty programs that are more often associated with Rousseff's party.

The same "tested and approved" measures are now needed at the federal level, Neves says, with Brazil on track to miss a key fiscal savings target this year.

To help restore Brazil's financial credibility and jump-start growth if he is elected, Neves has tapped Arminio Fraga, an investment fund manager and former central bank president who is well known on Wall Street, to be his finance minister.

"We need to renew our vows of fiscal responsibility," Fraga told Reuters recently.

Fraga has also pledged to pursue a more open trade policy and increase Brazil's investment rate to 24 percent of gross domestic product from around 18 percent now, primarily by improving ties with the private sector.

Even at Silva's peak, Neves remained the preferred candidate of most investors in Sao Paulo and on Wall Street, who point to his proven track record.

He opted not to change his campaign message, and instead waited for enthusiasm for Silva to fizzle.

As ballooning debt and a kickback scandal at Brazil's state-run oil company Petrobras became a campaign focus, Neves' supporters pointed to the performance of Minas Gerais' state-controlled power utility Cemig.

Cemig tripled in value and acquired Rio de Janeiro's power company Light when Neves was governor, thanks to management by "serious career professionals," adviser Danilo de Castro said.

Going forward, Rousseff's campaign will almost certainly portray Neves as a spoiled playboy who has no affinity for the poor. Though he left office with approval ratings near 90 percent in Minas Gerais, not everyone was happy.

The state teacher's union fiercely contests Neves' claims of educational advancement, saying budget cuts left too little money for school infrastructure and student lunch programs.

Others say he conveniently rebuilt the state government headquarters across the street from an airport to ease his frequent personal trips to Rio while bureaucrats were forced to commute through heavy traffic.

Neves' past personal life is another potential area of vulnerability. During the campaign he has had to explain his refusal to take a breathalyzer test in 2011 and deny widespread rumors that he used drugs in the past.

Supporters say his life has taken a more domestic turn since he married a former model 20 years his junior last year. She gave birth to twins in June.

"At no time has his personal life ever compromised his public life," Congressman Narcio Rodrigues, a long-time friend, told Reuters.