Panama’s new president-elect, José Raúl Mulino, was a late entry in the race

PANAMA CITY (AP) — José Raúl Mulino said he was practically retired from politics just over six months ago.

Now, he’ll be Panama’s president for the next five years.

Standing before a pack of supporters Sunday night, Mulino said: “I never imagined this.”

In a historic and tumultuous election, preliminary results put Mulino on top to lead the normally sleepy Central American nation through a moment of political tension, historic migration and a struggling economy.

The 64-year-old lawyer, whose last position in politics was as minister of security in then President Ricardo Martinelli’s 2009-2014 administration, was initially tapped by the popular former leader to be his running mate after Martinelli’s wife declined.

But then Martinelli was disqualified from running after he was sentenced to more than 10 years in prison for a money laundering conviction. Mulino took his place, and ended up winning Sunday’s presidential election with nearly 35% of the vote and a nine-point lead over his nearest opponent after dodging constitutional challenges to his own candidacy.

The president-elect got there with strong support from Martinelli, arguably the most important tool in Mulino’s campaign as he rode the fiery ex-leader’s popularity to victory.

While he lacks Martinelli’s charisma, the economic boom seen under his ally pushed many voters to support Mulino at a time that Panama’s economy has lagged.

The former president, who has been sheltering in the Nicaraguan Embassy since February after receiving political asylum, said his trust for Mulino dates back 30 years.

“Mulino seems a little tough, but he is a good guy, serious, and is the only one prepared to take on this great challenge and knows how the economy works to lift the country,” Martinelli said in a video broadcast to supporters at Mulino’s campaign close.

A maritime law attorney who graduated from Tulane University in New Orleans, Mulino became known as a private business leader who took part in a civil movement against the dictatorship of Gen. Manuel Antonio Noriega, who was ousted by an American invasion on Dec. 20, 1989.

He acted as vice minister of foreign affairs in the 1989-1994 administration of President Guillermo Endara, who took office after the fall of Noriega and the end of the Panamanian military regime. Mulino later remained in charge of the country’s international policy in the last part of that administration.

Mulino remained active in politics and more than a decade later backed Martinelli in the election that the supermarket magnate won in 2009. Mulino was appointed minister of the interior and justice, later taking the reins of the public security office.

Mulino says one of the achievements during that time was to “recover” a swath of Panama on the border with Colombia, known as the Darien Gap, which “was in the hands of the narco-guerrillas” of the neighboring country.

As president, he has promised to stop soaring levels of migration through the Darien jungles, where more than a half million people crossed last year, though experts question the viability of his plan due to the sheer quantities of vulnerable people traveling through the passage.

“I will make the effort to end this migratory crisis in our territory with respect for human rights and with sincere international participation,” Mulino said at the closing of his campaign last week.

U.S. Secretary of State Antony Blinken noted that controlling migration was one of the countries’ shared goals in congratulating Mulino for his victory.

“I look forward to continuing our strategic partnership and advancing our shared goals of democratic governance and inclusive economic prosperity,” Blinken said in a statement Monday. “Looking ahead, the United States will continue to work with Panama on our common goals of inclusive, sustainable economic growth, bolstering citizen security, and cooperatively curbing irregular migration through the Darien.”

As security minister, he was also the target of harsh criticisms following police repression of a protest of Indigenous banana growers in the northern provinces of Bocas del Toro and Chiriqui in 2010. The crackdown left two dead and more than 100 injured by pellet shots, among them some with eye injuries.

“He was quite severe in controlling social protests,” Panamanian political analyst Rodrigo Noriega told The Associated Press before the election. “There are a lot of unknowns about him.”