Ricardo Martinelli, a millionaire magnate who wants to run Panama like a corporation, was declared its next president as the country eyes a massive upgrade of its strategic canal.
The Electoral Board said its chairperson, Erasmo Pinilla, telephoned Martinelli, of the Alliance for Change, to give him the word.
"We are calling to announce to you that in accordance with the unofficial data the Electoral Board has, with 43.68 percent of the ballots counted, the board deems you the undisputed winner of the presidential race," Pinilla told Martinelli.
Martinelli (57), a gregarious businessman with a broad smile and shock of white hair, leads a business empire including supermarkets, banks and agricultural firms.
He had led going into the vote according to polls, despite government backing for his rival, social democrat Balbina Herrera, a one-time leftist firebrand.
Panama enjoys breakneck economic growth but is still plagued by deep poverty. Both campaigns focused on bringing wealth to the poorest Panamanians, and now it will fall upon Martinelli to see if he can deliver.
Income disparities are vast in Panama ? perched on the Central American land bridge between Colombia and Costa Rica ? and where 28 percent of the population of more than three million lives in poverty.
In the capital, slums sit a stone's throw from the presidential palace, in a Spanish colonial quarter that is home to jazz clubs, boutique hotels and upscale ice-cream parlors.
Martinelli tapped into popular discontent, promising to "walk in the shoes" of the ordinary citizens, who have been hit by rising prices.
Much of the country's wealth remains in the hands of a few families with European roots.
His win means that Martinelli ? for many a proven success at big business decisionmaking ? will get to oversee a massive $5.25-billion project to expand the congested Panama Canal, by adding a third set of locks that can handle ships laden with up to 12 000 containers each.
The 55-mile (80-kilometre) inter-oceanic waterway handles an estimated five percent of world trade, and most of the trade in goods between China and the east coast of the United States.
After an early lead, Herrera suffered from a wave of criticism of the ruling centre-left Revolutionary Democratic Party (PRD), which many accuse of not doing enough to redistribute vast income from shipping, banking, construction and multi-billion dollar bond sales.
The PRD has also been criticised for failing to tackle fragile public safety, particularly in Panama City and the down-at-heel Atlantic port city of Colon.
Current president Martin Torrijos ? the son of former general Omar Torrijos who was mysteriously killed in a plane crash ? has come under fire for failing to reform Panama City's sclerotic public transport system.
Under Panama's constitution Torrijos cannot run again, which led to the PRD selecting Herrera as its candidate.
Herrera, a former minister of housing, has also been criticised for her ties to questionable figures, notably David Guzman, the architect of a multi-million Colombian pyramid scheme, who has said he gave her three million dollars.
In his memoirs Manuel Noriega also claimed he hid at Herrera's house from US soldiers who invaded Panama and overthrew him in 1989.
Herrera denies links to either man.
Some 2.2 million people were eligible to vote. Voters also elected 71 members of the national assembly, mayors and members of municipal councils.