The Algerian-born terror suspect accused of recruiting Colleen "Jihad Jane" LaRose of Montgomery County into a 2009 plot to assassinate a Swedish artist won a two-year legal battle Thursday in Ireland to avoid extradition to the United States.

A federal grand jury in Philadelphia charged Ali Charaf Damache in 2011 with one count each of terrorism conspiracy and attempted identity theft. The indictment is part of a case that has already sent LaRose and two others to prison.

In the Dublin High Court decision Thursday, Justice Aileen Donnelly cited concerns over prison conditions in the United States and found that Irish state prosecutors had ignored their responsibility to attempt to try Damache first on terror charges in Ireland, where he holds citizenship.

"There are substantial grounds for believing that Mr. Damache will be at real risk of being subjected to inhuman and degrading treatment if extradited to the USA," Donnelly wrote.

Damache's lawyers had argued that he would face a far greater prison term if convicted in the United States than any potential punishment for the same crimes under Irish law.

He was released shortly after Thursday's ruling. It was not clear whether the U.S. Justice Department would seek other means of pursuing its case.

Damache, 50, emerged as a shadowy figure in the case against LaRose and her codefendants - one of the earliest prosecutions in this country of U.S. citizens seeking to aid violent jihadist efforts abroad.

Known by his online moniker "theblackflag," prosecutors say, he used jihadist websites to recruit white women and others who did not fit the typical terrorist profile.

His targets included the blond, blue-eyed LaRose; Jamie Paulin Ramirez, a Hispanic single mother from Colorado; and Mohammad Hassan Khalid, a former high school honors student from Maryland who eventually became the youngest person ever to be convicted in the United States on terrorism charges.

According to court filings, Damache persuaded LaRose and Ramirez to join him in Waterford, Ireland, with promises that they would launch an attack on Lars Vilks, a Swedish artist whose work depicting the prophet Muhammad's head on the body of a dog had offended some Muslims.

Ramirez, who took her son with her to Ireland, married Damache the day of her arrival. LaRose became disenchanted and eventually left the group, calling an FBI tip line seeking money to return home.

But at her sentencing hearing last year, LaRose still spoke of Damache with admiration.

"I had so much respect for him. I had this emotional attachment to him," she told U.S. District Judge Petrese B. Tucker. "He was so brave."

She was sentenced to 10 years in prison and is serving out her term in Tallahassee, Fla.

Ramirez was sentenced to eight years. Khalid is set to be released in December, after a five-year term.

Damache could have faced up to 45 years in prison if convicted in the United States.

His lawyers in Ireland did not return calls for comment Thursday.