By Mitra Taj and Caroline Stauffer

LIMA (Reuters) - Former investment banker Pedro Pablo Kuczynski was on track to become Peru's next president after a near-final vote tally gave him a slim lead in the tightest election in decades, although his populist rival Keiko Fujimori had yet to accept defeat.

Outgoing President Ollanta Humala and the leaders of Colombia, Chile, Argentina and Mexico congratulated Kuczynski after the latest official results on Thursday made it nearly impossible for Fujimori to catch up even though Kuczynski led by only 40,000 votes.

Kuczynski, a centrist economist known in Peru by his initials PPK, said he would wait for a complete count before claiming victory as thousands of disputed or unclear ballots remained uncounted.

Kuczynski promised to unify Peru after the divisive election that many saw as a referendum on the controversial legacy of Fujimori's father, imprisoned former authoritarian leader Alberto Fujimori, in Peru's fourth straight democratic election.

"We're going to work for all Peruvians," Kuczynski, 77, said in a news conference as supporters cheered him in the streets. "We take this virtual verdict with much modesty."

The thin margin of victory and lack of allies in Congress would leave Kuczynski with one of the weakest mandates of any recent Peruvian president.

Either of the two business friendly candidates would face tough economic challenges, as slumping mineral prices have hit Peru, a global supplier of copper, zinc and gold.

To kickstart the economy, Kuczynski has proposed widening the fiscal deficit, lowering sales taxes, and investing in new infrastructure projects.

The latest count put Kuczynski ahead of 41-year-old Fujimori by just a quarter percentage point, according to electoral office ONPE. While the gap has fluctuated somewhat in recent days, Fujimori has trailed throughout the vote count.

Still, 0.2 percent of votes had not be tallied because they were unclear or dispute.

Members of Fujimori's Popular Force party said electoral authorities should annul bundles of ballots because they had detected irregularities at polling stations.

"Nobody, absolutely nobody...can claim victory yet," congressman Pedro Spadaro told reporters.

Some 140 bundles of ballots were still under review by authorities late on Thursday. However, with each bundle holding up to 300 votes, Fujimori would not be able catch up to Kuczynski even if all were in her favor.

Fujimori remained largely silent amid growing calls for her to congratulate Kuczynski.

"Acknowledging defeat would be best for democracy," said Fernando Tuesta, a political analyst and the former head of Peru's electoral board.

'DEADLY THREAT TO DEMOCRACY'

Fujimori, who became her father's first lady at 19 when he divorced her mother, had long been the favorite to win the election, thanks in part to the popularity of the family name in provinces where his government built schools and cracked down on the bloody Shining Path insurgency.

Alberto Fujimori is now serving a 25-year sentence for graft and human rights abuses committed during his 1990-2000 government.

On the campaign trail, she tried to distance herself from her father and criticized him for ordering the military to shutter Congress in 1992. But she never acknowledged he committed any crimes.

"I voted for PPK because he is a man with experience and does not have her past," said Mario Palomino, 70.

But the broad support that Kuczynski enjoyed as many rallied behind him in the second-round race to defeat Fujimori might evaporate once he assumes power, making it hard for him to govern. His party will control just 18 congressional seats, behind Fujimori's 73 and a leftist party's 20.

Widely seen as honest, Kuczynski caught up with Fujimori in the final stretch of campaigning after he called her "a deadly threat to democracy" in a debate as she was stung by scandals involving her close advisers.

It would be Fujimori's second consecutive narrow loss in a presidential run-off race and a further blow to the populist politics that have fallen out of favor in the region.

But her apparent defeat does not mean the Fujimori name is politically dead in Peru. Popular Force is the country's best organized party and her younger brother, a lawmaker, has said he would run for president in the next election if she lost.

A former prime minister, Kuczynski dismissed Fujimori's tough stance on crime, including promises to build prisons high in the Andes to isolate prisoners, as myopic and cruel.

Kuczynski has promised to ensure every town has piped water while cleaning up endemic corruption in the Andean country where one in five Peruvians still live in poverty despite nearly two decades of uninterrupted economic growth.

"Many Peruvians feel the train has already passed them by," said Kuczynski. "I want all to get on board right away."

(Additional reporting By Marco Aquino, Teresa Cespedes and Ursula Scollo; Editing by Tom Brown, Kieran Murray and Simon Cameron-Moore)