Ollanta Humala has snagged Perú's presidency, outlasting Keiko Fujimori in a bitter battle that went down to the wire.

Humala, 48, a leftist former army officer with questioned human rights credentials, won Sunday over Fujimori, the daughter of the country's disgraced ex-president. He went over the top after softening his radical image and disavowing the affinity for Venezuela's socialist President Hugo Chávez that fueled his defeat five years earlier.

Fujimori promises Perú's poor a greater share of the Andean nation's considerable mineral wealth and pledged in victory to honor the free market but put Perúvians first.

The former army lieutenant colonel won 51.5 percent of the vote against 48.5 percent for Keiko Fujimori, according to complete unofficial results compiled by the independent election watchdog Transparencia.

Official results, with 87 percent of the vote counted, had Humala ahead with 51.2 percent but officials cautioned that rural districts where Humala fared better were slow in reporting.

Humala told supporters Sunday night he'd work to convert a decade-long economic boom that is the envy of Latin America into "the great motor of the social inclusion Perúvians desire." He says he'll do so by taxing windfall mining profits and exporting less natural gas so Perúvians get it cheaper.

Rife with mudslinging and dirty tricks, the campaign was marred by doubts about both candidates' commitment to democracy.

Fujimori's father is serving a 25-year prison term for rights abuses and corruption, and many Perúvians considered her little more than his proxy. Humala has been accused of violent excesses as an army counterinsurgency unit commander in the 1990s and of encouraging a bloody uprising his brother staged in 2005 seeking to oust then-President Alejandro Toledo that cost four policemen their lives.

Keiko Fujimori, 36, did not immediately concede, instead appearing briefly before supporters Sunday night to ask them "responsibly and with prudence" await official results.

Humala narrowly lost the presidency to Alan García in 2006. In that election he presented himself as a fan of Gen. Juan Velasco, the leftist dictator who expropriated land from the rich and nationalized a raft of industries during his 1968-75 rule.

This time, Humala tempered his rhetoric.

After initially vowing to renegotiate free trade agreements and rewrite the constitution "to create an economic regime with social justice as its goal" he reversed himself, pledging to instead follow Brazil's market-friendly model for elevating the poor.

Two weeks ago, he swore on the Bible to respect democracy and press freedom.

But Humala failed to win over the business elite and most of the news media, which campaigned openly against him. They fear he's a Velasco reincarnate.

As he rose in popularity, stockholders sold off shares in Lima's exchange.

Billions are at stake. Investors have pledged more than $40 billion over the next decade to develop gold, silver, copper and other mining operations in rich Andean lodes.

In a rousing victory speech Sunday to more than 10,000 supporters in central Lima, Humala said he would create jobs, build homes, and deliver running water and electricity to long-neglected backwaters.

"We've been waiting a long time for a government that really cares about the poor," he said, rather than catering to a Lima elite that sells transnationals the mineral riches that comprise more than 65 percent of Perú's export earnings.

"This has got to change, and it's for this change that I am here. That is why I got into politics," Humala said. "I'm only interested in achieving what I've offered the Perúvian people."

His base was the one in three Perúvians who are poor — in Perú's rural highlands its closer to two in three.

José Romero, a 58-year-old construction worker who said he was harassed for labor organizing during Alberto Fujimori's regime, was overjoyed by Humala's win and pledges to protect workers from exploitation that let employers hire people full time without paying benefits.

"We're getting everything back with him. Good jobs will come back. There won't be corruption. I believe in his word," said Romero, who is from Perú's poorest state, Huancavelica.

Both candidates promised a raft of giveaways for the poor, including free school meals and preschool care. Humala promised a government pension for all at age 65.

Exit polls gave Humala better than 70 percent of the vote in four poor highland states including Puno, where Aymara Indians who object to a planned Canadian-owned silver mine suspended a nearly monthlong highway blockade so people could vote. The protesters fear the mine will poison their water.

Fujimori did capture Lima, but by a modest margin.

Humala finished first in the election's April 10 first round, when three centrist candidates together split 45 percent of the vote. He got a big boost with the endorsement of Toledo, who finished fourth. Toledo had previously likened voting for Humala to "a jump into the abyss."

Had Toledo and the other two centrists united behind a single candidate they could have elbowed out Keiko Fujimori. But Perú is a country where personality decides elections rather than political party affiliations or ideologies. Its parties are weak, its political class considered extremely corrupt.

That opens the door for outsiders like Humala and Fujimori's father, Alberto. He vanquished hyperinflation and fanatical Shining Path rebels during his autocratic 1990-2000 presidency. A fifth of Perúvians revere the man, but his legacy of corruption hurt his congresswoman daughter. Humala harped on it.

He says he'll put crooked politicians in jail and make it easier for citizens to recall dishonest elected leaders.

Perú's best-known public intellectual, 2010 Nobel literature laureate Mario Vargas Llosa, said Humala's win "saved democracy."

"What's important is that we have been freed from the return to power of a dictatorship that was terribly corrupt and bloody," he told CPN radio. "We should congratulate ourselves and celebrate."

Humala insists he'll steer Perú closer to the United States and Brazil than to Chávez's leftist camp, which includes Venezuela, Bolivia and Ecuador, none of which currently have U.S. ambassadors.
Former New Mexico Gov. Bill Richardson, in Perú as an Organization of American States election observer, met with both candidates and said he didn't consider Humala another Chávez.

"He is a nationalist and an enigma with evolving views and a pragmatic streak," Richardson said. "I think he's educable and the business community should give him a chance."

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino