An opposition candidate was headed to victory Sunday in Panama as the region's fastest-growing economy voted for president in an unusually tight race.
Almost complete results showed Juan Carlos Varela of a center-right party winning the presidency. "The trend is irreversible," elections bureau President Erasmo Pinilla said in a news conference.
Later, he telephoned Varela and said: "You are the next president of the republic."
Varela's victory dashes the hopes of outgoing President Ricardo Martinelli to keep some hold on power.
The next president is expected to continue the current government's free-market policies and will oversee the ambitious expansion of the vital Panama Canal, a project beset by cost overruns, delays and strikes.
More than 2 million eligible voters were choosing among seven candidates — with only three of them seen as having a reasonable shot at victory — in an election season during which Martinelli fought mightily, and some say improperly, to sustain his influence.
His handpicked candidate, Jose Domingo Arias, was neck and neck with Varela and another opposition candidate heading into Sunday's election.
Martinelli was widely criticized for attempting to pull off the same type of constitutional change that some of his leftist counterparts in the region had used successfully to remain in power for successive terms.
A right-wing entrepreneur, Martinelli was ultimately blocked from running for reelection. Instead he worked to try to make sure that his candidate would replace him. In addition, Arias' vice presidential candidate was Martinelli's wife.
Although serving as vice president, Varela had a falling out with Martinelli and was not his man in this race. Martinelli took to publicly insulting Varela.
Panamanians often vote against the established candidate.
"He made a big mistake," former President Aristides Royo told CNN's Spanish-language service, referring to Martinelli's efforts to hold on to power. "The people tend to go with the opposition."
Trained at Georgia Tech and local Jesuit schools, Varela is expected to stick to Martinelli's pro-business economic policies, but he promised to run a cleaner and less corrupt government. One of several scandals facing the Martinelli administration involves possible bribes paid to officials by an Italian defense company.
Yet Varela too has had his share of troubles. He reportedly is under investigation for money laundering, in a country where such illegal practice is rampant.
His Panamanist Party is an iteration of a party that emerged in the wake of the 1989 U.S. invasion of Panama that ousted military dictator Gen. Manuel Noriega and ushered in democracy. Noriega is in a Panamanian prison after serving two decades in U.S. and French jails.
Some in Panama saw this election as an important test of the country's nascent democracy. Under Martinelli, Panama has seen a huge real-estate boom, the construction of Central America's first subway and numerous other public works projects. But there were persistent questions about whether Martinelli's cronies were the real beneficiaries and whether such growth was sustainable.