Panama’s opposition leader Juan Carlos Varela has won the presidential election with almost 40% of the votes.
Juan Carlos Varela, who is currently the vice-president, had distanced himself from outgoing President Ricardo Martinelli.
Correspondents say Juan Carlos Varela has taken credit for Ricardo Martinelli’s economic success, but has promised a cleaner, more transparent government.
The president’s preferred candidate, the governing party contender Jose Domingo Arias, came second.
President Ricardo Martinelli had actively supported the campaign of Jose Domingo Arias, 50, and the leader’s wife Marta Linares was the candidate’s running mate.
Critics said his support for the Arias-Linares team was an attempt by Ricardo Martinelli to hold on to the reins of power.
Under the Panamanian constitution, presidents are obliged to step down after one term and are banned from running for the two following terms.
Juan Carlos Varela, a former centre-right ally of Ricardo Martinelli, fell out with the president after he was dismissed from his post as foreign minister in 2011.
After he had achieved an unassailable lead in the poll, Juan Carlos Varela, 50, told Reuters news agency that “better times are on their way”.
Alluding to allegations of corruption against Ricardo Martinelli’s government, he said his would be “an honest, humane government of national unity”.
Hearing of Juan Carlos Varela’s win, Ricardo Martinelli said: “I know the candidate, and really, may God help us!”
He said in light of Juan Carlos Varela’s success he would change his plans of “enjoying life” and go into opposition instead.
Juan Carlos Varela struck a conciliatory note, saying it was time “to put the party banners away and to govern under one flag, that of Panama”.
Despite his unexpected win in the presidential poll, Juan Carlos Varela’s party only got 11 of the 71 seats in Congress which were also up for election.
After his swearing-in on July 1st, Juan Carlos Varela will therefore have to form alliances with the opposition to push his planned reforms through the legislature.
He faces the challenge of maintaining buoyant growth while dealing with economic inequality, with a quarter of the population living in poverty.
Juan Carlos Varela will also have oversight of a major expansion of the Panama Canal, which accounts for 8% of gross domestic product in the country.
Recent discontent led to a nationwide construction strike over pay, which halted work on the canal and thousands of other projects.
Among the first leaders to congratulate Juan Carlos Varela was Venezuelan President Nicolas Maduro.
Venezuela earlier this year broke ties with Panama accusing the Central American nation of fomenting a coup against Nicolas Maduro by offering support to a Venezuelan opposition leader.
[youtube KkWPSMydGEY 650]