Panamanian Vice President Juan Carlos Varela has been declared the victor in the country's presidential election, thwarting an attempt by outgoing President Ricardo Martinelli to extend his grip on power by electing a hand-picked successor.

According to official results released on Sunday, Varela leads with 39 percent of the votes, compared to 32 percent for Jose Domingo Arias, the preferred successor of Martinelli. Former Panama City Mayor Juan Carlos Navarro is third in the seven-candidate field with 27 percent.

Varela dedicated his victory to Panama's democracy when the Electoral Tribunal's chief magistrate notified him by telephone of his victory.

The center-right vice president inherits oversight of a major expansion of the Panama Canal, which was briefly stalled earlier this year after a row over costs between the canal and the building consortium.

Juan Carlos Navarro (l), Juan Carlos Varela (m) and Jose Domingo Arias (r) [AFP]

He also faces the challenge of maintaining a buoyant economic growth and ensuring the benefits trickle down in a land where a quarter of the population lives in poverty.

Varela had helped Martinelli win the presidency in 2009, but the two later fell out over his dismissal as foreign minister in 2011. 

Varela, a 50-year-old engineer, is the scion of one of Panama's richest families and owner of a namesake rum distillery. He left the 2009 presidential race to throw his conservative Panamenista party's support behind Martinelli in exchange for the vice presidency.

 But the political relationship didn't last, and Martinelli dismissed him from an additional role as foreign minister in 2011 for refusing to back a plan for a referendum to allow president's to serve consecutive terms.  

Since then, Varela has been the president's fiercest critic, accusing him of taking kickbacks for a government radar system contract. Martinelli denied the charges.  

In turn, Martinelli all but marginalized Varela from decision-making and called the vice president for collecting his government paycheck without doing any work.  

A free-market conservative, Varela also has strong social credentials, having been the architect of a popular program at the start of Martinelli's presidency to provide a $100 monthly stipend to Panamanians over age 70 without a pension or retirement benefits.

As campaigning turned ugly in the final stretch, Varela was hit by accusations that he had received payments from the daughter of a political ally convicted in the US of laundering money for an illegal online gambling ring.

Varela vigorously defended himself after the accusations first appeared last month on a Florida-run website, Diario Las America, and he accused Martinelli of leaking the story trying to derail his campaign. He said the checks he received from accounts managed by Michele Lasso were connected to legitimate business dealings with her father, a former Panamanian ambassador to South Korea, and donations to his 2009 presidential campaign, which he reported to the nation's electoral tribunal.

Martinelli's five-year presidency has been characterised by strong economic growth but also tarnished by allegations of corruption. He will remain president until July 1.

A banking and trading hub, Panama is best known for the canal that links the Atlantic and Pacific Oceans.

Accounting directly for eight percent of gross domestic product, it has helped fuel the fastest growth in Latin America in the last few years.

Source: Agencies