An Irish citizen, who was born in Algeria, has pleaded guilty to making a menacing phone call to an American lawyer in 2010.

Ali Charaf Damache, 47, with an address at High Street, Waterford city, was sentenced to four years in jail with the final year suspended for making the phone call to Michigan-based attorney Majed Moughni.

With time already served, he was released from custody at Waterford Circuit Court this evening but was re-arrested immediately by gardaí on foot of an US extradition warrant.

He is wanted in the US having been charged with conspiracy to provide material support to terrorists.

The Department of Justice in the US says Damache, known as Theblackflag, is charged with one count of conspiracy to provide material support to terrorists and one count of attempted identity theft to facilitate an act of international terrorism.

The department said in 2011 that the US intends to seek his extradition from Ireland to stand trial in the eastern district of Pennsylvania.

If convicted of the charges against him, Damache faces a potential sentence of 45 years in prison.

Today, Damache changed his plea on day six of his trial at Waterford Circuit Court relating to a phone call he made the day after a rally was organised outside a Detroit courthouse by Majed Moughni.

The rally was organised by Mr Moughni to denounce acts of terrorism in the name of Islam.

Appearing in the courthouse in Detroit on 8 January 2010 had been a man considered to be a Muslim extremist. He was due to be charged in relation to an attempted bombing at Detroit Airport on 25 December, 2009.

The rally went ahead and was considered a success and received some publicity around the world, Waterford court had heard.

In the early hours of the following day, Mr Moughni received a telephone call from Damache.

Mr Moughni's wife recorded the five-minute conversation in which Damache said: "If you are in front of me, I would shoot you. I would put a bullet in your head."

He also said: "Even in America, we will get you, you will pay."

A charge of threatening to kill Mr Moughni was withdrawn.

The court heard Damache was originally from Algeria but had emigrated to France when his parents divorced.

He went back to Algeria and served in the Algerian navy from the age of 20 to 27.

He married his childhood sweetheard but subsequently divorced her and came to Ireland in 2000, where he lived mainly in Cork.

He sought refugee status and married an Irish woman in 2002.

They split up in 2008 and he moved to Waterford, where he married an American woman, Jamie Paulin Ramirez, in a Muslim wedding at a mosque.

Jamie Paulin Ramirez has pleaded guilty in the US to charges she conspired with another woman, Colleen LaRose, also known as Jihad Jane, to support and train terrorists.

Today in court, Damache's legal representation said his client wanted to give a heartfelt apology for calling Mr Moughni, that it was a wrongful act and that he was not in a good frame of mind when he made the call.

He said it had been misguided, wrong and naive.

Judge Donagh McDonagh said it was not a casual call, it was most menacing, that there was nothing impulsive about Damache sourcing the phone number of Mr Moughni, and that it was premeditated.

He also praised the extraordinary work done by the gardaí in the case.

He said there was nothing trivial about the phone call as it had an international dimension to it, which had to be taken into account and that it was of a quasi-political setting.

He sentenced Damache to four years in prison, with the final year suspended.

Since he has been in custody since his arrest on 9 March 2010, he was free to go today.

A few minutes after his release, he was rearrested at Waterford courthouse by detectives and taken to Waterford Garda Station.

It is expected that Damache's extradition hearing may go before the High Court tomorrow.

The US lawyer whom Damache threatened has responded to today's sentence.

Speaking from Detroit, Mr Moughni said he was pleased with the outcome.