NEW YORK -- Former Honduran President Juan Orlando Hernández was convicted Friday in New York of charges that he conspired with drug traffickers and used his military and national police force to enable tons of cocaine to make it unhindered into the United States.

The jury returned its verdict at a federal court after a two-week trial, which has been closely followed in his home country. Hernandez was convicted of conspiring to import cocaine into the United States and two weapons counts. The charges carry a mandatory minimum of 40 years in prison and a potential maximum of life. Sentencing was set for June 26.

Hernández, 55, who served two terms as the leader of the Central American nation of roughly 10 million people, patted a defense attorney, Renato Stabile, on the back as they stood along with everyone else in the courtroom while the jurors filed out after the reading of the verdict.

When the news reached nearly 100 opponents of Hernández on the street outside the courthouse, they applauded and began jumping into the air to celebrate the outcome.

The scene in the courtroom was subdued and Hernández seemed relaxed as the verdict on three counts was announced by the jury foreperson. At times, Hernández had his hands folded before him or one leg crossed over the other as each juror was asked to affirm the verdict. They all did.

In remarks to the jury before they left the courtroom, Judge P. Kevin Castel praised jurors for reaching a unanimous verdict, which was necessary for a conviction.

鈥淲e live in a country where 12 people can鈥檛 agree on a pizza topping,鈥 the judge told them, saying his message would have been the same regardless of their verdict. 鈥淭hat鈥檚 why I鈥檓 in awe of you.鈥

Defense attorney Sabrina Shroff said Hernández will appeal the conviction.

In a release, U.S. Attorney Damian Williams said he hopes the conviction 鈥渟ends a message to all corrupt politicians who would consider a similar path: choose differently.鈥

He added that Hernández 鈥渉ad every opportunity to be a force for good in his native Honduras. Instead, he chose to abuse his office and country for his own personal gain and partnered with some of the largest and most violent drug trafficking organizations in the world to transport tons of cocaine to the United States.鈥

Hernández was arrested at his home in Tegucigalpa, the Honduran capital, three months after leaving office in 2022 and was extradited to the U.S. in April of that year.

U.S. prosecutors accused Hernández of working with drug traffickers as long ago as 2004, saying he took millions of dollars in bribes as he rose from rural congressman to president of the National Congress and then to the country's highest office.

Hernández acknowledged in trial testimony that drug money was paid to virtually all political parties in Honduras, but he denied accepting bribes himself.

He noted that he had visited the White House and met U.S. presidents as he cast himself as a champion in the war on drugs who worked with the U.S. to curb the flow of drugs to the U.S.

In one instance, he said, he was warned by the FBI that a drug cartel wanted to assassinate him.

He said his accusers fabricated their claims about him in bids for leniency for their crimes.

"They all have motivation to lie, and they are professional liars,鈥 Hernández said.

But the prosecution mocked Hernández for seemingly claiming to be the only honest politician in Honduras.

During closing arguments Wednesday, Assistant U.S. Attorney Jacob Gutwillig told the jury that a corrupt Hernández 鈥減aved a cocaine superhighway to the United States.鈥

Stabile said his client 鈥渉as been wrongfully charged鈥 as he urged an acquittal.

Trial witnesses included traffickers who admitted responsibility for dozens of murders and said Hernández was an enthusiastic protector of some of the world's most powerful cocaine dealers, including notorious Mexican drug lord Joaquín 鈥淓l Chapo鈥 Guzmán, who is serving a life prison term in the U.S.

Hernández, wearing a suit throughout the trial, was mostly dispassionate as he testified through an interpreter, repeatedly saying 鈥渘o sir鈥 as he was asked if he ever paid bribes or promised to protect traffickers from extradition to the U.S.

His brother, Juan Antonio 鈥淭ony鈥 Hernández, a former Honduran congressman, was sentenced to life in 2021 in Manhattan federal court for his own conviction on drug charges.