Two men have been convicted of helping Somali pirates who kidnapped a U.S. journalist for ransom and held him for 2 1/2 years, prosecutors said.

Mohamed Tahlil Mohamed and Abdi Yusuf Hassan were convicted by a federal court jury in New York on Feb. 24 of hostage-taking, conspiracy, providing material support for acts of terrorism and other crimes that carry potential life sentences.

Michael Scott Moore, a German-American journalist, was abducted in January 2012 in Galkayo, Somalia, 400 miles northeast of the capital of Mogadishu. He was working as a freelancer for the German publication Spiegel Online and researching a book about piracy.

FOUR AMERICANS WHO TRAVELED INTO MATAMOROS, MEXICO MISSING IN POSSIBLE KIDNAPPING: FBI

The kidnappers demanded $20 million in ransom and at one point released a video showing Moore surrounded by masked kidnappers who pointed a machine gun and rocket-propelled grenade at him.

Moore was freed in September 2014. Moore has said his family raised $1.6 million for his release.

"Tahlil, a Somali Army officer, left his post to take command of the pirates holding Moore captive and obtained the machine guns and grenade launchers used to threaten and hold Moore," U.S. Attorney Damian Williams said in a statement. "Hassan, the Minister of Interior and Security for the province in Somalia where Moore was held hostage, abused his government position and led the pirates’ efforts to extort a massive ransom from Moore’s mother."

Michael Scott Moore

Michael Scott Moore, author of "The Desert and the Sea: 977 Days Captive on the Somali Pirate Coast," poses for a portrait in Los Angeles on June 20, 2018.  (AP Photo/Chris Pizzello, File)

Hassan, who was born in Mogadishu, is a naturalized U.S. citizen. He was arrested in Minneapolis in 2019 and charged with federal crimes.

Details of Tahlil's arrest haven't been disclosed but he was jailed in New York City in 2018.

In a 2018 book Moore wrote about his captivity, he said that Tahlil got in touch with him from Somalia by Facebook two months after the journalist's release and included a photograph. Moore recognized him as the ""boss" of his guards.

GOP SENATORS TOUR SOUTHERN BORDER IN TEXAS, SAY MIGRANT CRISIS IS ‘SELF-INFLICTED WOUND’ 

The men began a correspondence.

"I hope u are fine," Tahlil said, according to the book. "The pirates who held u hostage killed each other over group vendetta and money issues."

According to the criminal complaint reported by the New York Times, that was consistent with reports that some pirates were killed in a dispute over division of Moore's ransom.

CLICK HERE TO GET THE FOX NEWS APP

Hassan and Tahlil were scheduled to be sentenced on Sept. 6.

Attorneys for the two men were emailed for comment by The Associated Press after hours on Monday but the messages weren't immediately returned.