Joshua Molloy, a 24-year-old Irishman from Co Laois who was arrested in Iraq for fighting against the Islamic State (ISIS), has been freed.

He reportedly traveled to the Middle East in April of last year to fight with a Kurdish group, but was recently arrested by Iraqi authorities while attempting to make his way back home, the Irish Times reports.

Molloy had served in the British army for four years before deciding to leave for Syria to help stem the rise of ISIS.

He was arrested in Iraq along with two British companions earlier this month on grounds of entering the country illegally.

Molloy and fellow ex-British soldiers Joe Akerman (37), and Jac Holmes (23, from Dorset) reportedly had been fighting with YPG, a Kurdish group that is attempting to resist the advances of ISIS.

Efforts to secure the release of the men were led by the British Foreign Office.

The Foreign and Commonwealth Office in London was not able to confirm to the Irish Times if the two British citizens had also been freed.

Minister for Foreign Affairs Charlie Flanagan said in a tweet on Sunday: “I welcome the release of Irish citizen Joshua Molloy in Iraq. I thank all who helped & I wish him a safe journey home to join his family.”

Joshua Molloy’s father, Declan, said he found out his son would be freed last night after a telephone call with Flanagan on Saturday night.

“We are all delighted here. We are jumping with joy to know that he is out,” said Declan Molloy, who has repeatedly insisted that his son traveled to Syria for humanitarian reasons.

“You know that Christmas morning feeling? It’s a bit like that, when you find your most sought-after present under the tree, the dream present. That’s how we feel.”

He said he talked to his son this morning via Facebook and reported that he was “fine” but felt that he would probably need some time alone after his ordeal.

Molloy was released from prison on Sunday morning, but it is not known when he will return to Ireland.

24-year-old soldier from Laois, Joshua Molloy, was arrested for illegally crossing the border in an attempt to get home to Ireland.Facebook