PANAMA CITY (AP) -- Panama's President Ricardo Martinelli, never known to be a good loser, swallowed an initial bitter reaction to the election of an archrival as his successor and offered his support on Monday for the coming transition.
Martinelli snapped "May God help us" as he learned the night before of Vice President Juan Carlos Varela's surprise victory, saying he would shelve plans for a quiet retirement and would vigorously oppose his former ally's rule.
But as the sting of the defeat settled in, the billionaire supermarket magnate offering his compliments, at least on Twitter.
"Yesterday Panama won," Martinelli wrote on the social media network. "I congratulate the president for his resounding triumph. Today I'll call to tell him that and to begin the transition."
Results that were nearly complete Monday showed Varela won Sunday's presidential election with 39 percent of the votes, compared to 32 percent for Martinelli's choice, political newcomer Jose Domingo Arias. Juan Carlos Navarro, a former mayor of the capital, finished third with 28 percent.
Varela, who takes office July 1, waved the nation's flag at a rally to celebrate his victory and vowed to put aside the partisan bickering of the past five years and put an end to corruption that worsened under Martinelli.
"Whoever wants to do business should grab their things and go to the private sector," he told a cheering crowd in a clear swipe at the outgoing president.
In his first comments as president-elect, Varela on Sunday night said re-establishing ties with Venezuela, which were were severed in March by that country's socialist government, would be a top priority even as Panama continues to call for dialogue and respect for human rights in Venezuela's grinding political crisis.
He said President Nicolas Maduro was one of the first regional leaders to call and congratulate him.
Pre-elections polls had pointed to the tightest race since democracy was restored two decades ago, but none of the major surveys had Varela with a lead. Most gave a razor-thin edge to Arias.
A free-market conservative, the 50-year-old Varela also has strong social credentials. Before breaking with Martinelli in 2011, he was the architect of the government's popular "100 for 70" program that provides a $100 monthly stipend to Panamanians over age 70 without a pension or retirement benefits.
Although Martinelli wasn't on the ballot, the billionaire supermarket magnate's presence loomed large during the campaign. Many worried he would be the power behind the throne if voters chose Arias, a soft-spoken former housing minister, and even seek to change the constitution to eliminate a two-term cooling off period before becoming eligible again to seek the presidency.
With his wife, Marta Linares, as Arias' running mate, Martinelli crisscrossed the isthmus inaugurating hospitals, stadiums and Central America's first subway while warning the 4 million Panamanians that record-low unemployment and economic growth that averaged more than 8 percent since he took office in 2009 could be jeopardized if his opponents won.
Never since the United States' 1989 overthrow of military strongman Manuel Noriega has an incumbent party won re-election in Panama.
The outgoing president will have a strong platform from which to battle Varela: Candidates from his Democratic Center party were the biggest winners in congressional voting Sunday, taking an estimated 30 of 71 seats in the legislative assembly. Varela's alliance won just 12 seats, meaning he will almost have to negotiate with Navarro's center-left Democratic Revolutionary Party, which elected 21 representatives.
Varela, who studied engineering at the Georgia Institute of Technology, is the scion of one of Panama's richest families, owner of the Varela Hermanos rum distillery. He left the 2009 presidential race to throw his conservative Panamenista party behind Martinelli in exchange for the vice presidency.
But 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 with Italy's Finmeccanica.
Martinelli denied the charges and in turn marginalized Varela from decision-making, never tiring of calling the vice president a parasite for collecting supposedly collecting a government paycheck without doing any work.
Varela, meanwhile, was accused off receiving payments from the daughter of a political ally convicted in the U.S. of laundering money for an illegal online gambling ring.
Varela said in a February interview he would continue Martinelli's drive to improve Panama's infrastructure, the linchpin of the president's 60 percent approval rating.
Associated Press writer Juan Zamorano reported this story in Panama City and Joshua Goodman reported from Bogota, Colombia.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.