Peru's right-wing candidate Keiko Fujimori has admitted defeat in the run-off of the presidential election.
Ms Fujimori congratulated her rival, nationalist former army officer Ollanta Humala.
Mr Humala was leading by more than three percentage points with nearly all votes in.
Reacting to the result, the stock exchange in the capital Lima, fell by more than 10% shortly after opening and trading was suspended for two hours.
"I recognise his triumph," Ms Fujimori said in a brief message to the media.
The two candidates shook hands after a brief meeting behind closed doors.
Mr Humala had already declared victory on Sunday night.
With most votes counted, the leftist ex-soldier has 51.6% of the vote, with Ms Fujimori on 48.4%.
In his victory speech, Mr Humala promised that poor Peruvians would share the country's mineral wealth and benefit from its impressive economic growth.
Mr Humala and Ms Fujimori, the daughter of jailed ex-president Alberto Fujimori, are at opposite ends of the political spectrum - a fact that worried some Peruvians who said they would not vote for either of them.
It was one of the tightest election races in Peru's recent history - and the bitterest, says the BBC's Dan Collyns in Lima.
This was a run-off vote after the first round on 10 April saw three centrist candidates defeated, but left neither Mr Humala nor Ms Fujimori with the 50% of votes needed to win outright.
Once Mr Humala is confirmed as the winner, he will succeed Alan Garcia, who could not stand for a second term.
Ollanta Humala, 48, comes from a left-wing tradition of greater state intervention.
He staged a short-lived rebellion against Alberto Fujimori in 2000 and narrowly lost to Mr Garcia in the last presidential election in 2006.
Mr Humala campaigned on a promise to increase the state's role in the economy and redistribute wealth to Peru's poor majority.
His critics fear he will embark on interventionist policies similar to those of President Hugo Chavez in Venezuela, although Mr Humala says he is more in sympathy with Brazil's moderate left-wing approach.
He has also denied allegations that he committed human rights abuses during the fight against Shining Path rebels in the 1990s when he was an army captain.
Keiko Fujimori, 36, appealed to Peruvians who still admire her father, president for a decade from 1990. He is now serving a 25-year jail sentence for corruption and organising death squads.
She has defended his record, saying by taming hyper-inflation and defeating Marxist Shining Path rebels, he laid the basis for Peru's current economic boom.
She supports free-market economic policies, advocates a tough approach to crime and promised to improve social programmes and infrastructure in poor areas.
Critics say her main aim by running for president was to secure a pardon for her father, a claim she denied.
The new president will have to pull back together a polarised nation, our correspondent says.