Egyptian authorities have released an Irish-Egyptian man who was detained for four years on charges related to a Muslim Brotherhood protest in Cairo in 2013, his lawyer said.

Ibrahim Halawa's release Thursday, announced by Irish lawyer Darragh Mackin, came a month after an Egyptian court acquitted him of charges including murder, arson and illegal possession of weapons. He was tried along with nearly 500 defendants, who received sentences up to life in prison in a mass trial that was slammed by rights groups as unfair.

Amnesty International hailed Halawa's release a "resounding victory" in a Friday statement. "He should never have been jailed in the first place," the group's North Africa Campaigns Director, Najia Bounaim, said.

Irish officials welcomed the news as well, saying the government is working on returning the 21-year old Halawa to Ireland. He is from Dublin.

"We are helping him to get back to Ireland to be reunited with his family and get on with his life and his studies," Irish Prime Minister Leo Varadkar said. "He's receiving full consular assistance at the moment."

Irish Foreign Affairs Minister Simon Coveney said "all appropriate ongoing support that Ibrahim requires in the period ahead will be available to him."

Halawa was arrested at the age of 17, along with his three sisters, in August 2013. He is the son of a senior member of the Muslim Brotherhood, an Islamist group that swept to power in elections after the 2011 uprising but is now outlawed as a terrorist organization in Egypt.

His arrest took place days after security forces violently broke up a sit-in by supporters of Islamist President Mohammed Morsi, who hailed from the Brotherhood and had been overthrown by the military the previous month after mass protests against his divisive, one-year rule. His sisters were freed later in 2013 before leaving Egypt and have been campaigning for his release since.

Egyptian authorities have launched a severe crackdown on Brotherhood members and supporters since Morsi's overthrow, arresting thousands of his Islamist supporters as well as a number of secular and liberal activists.