A 21-year-old Afghan man who was discovered on a roadside near Naas by gardaí last month has been granted bail and released from Cloverhill Prison, where he was being held on remand.

Walli Ullah Safi appeared before Naas District Court where Judge Patrick Clyne was told he is now officially an asylum seeker.

As part of his bail conditions Mr Safi must notify gardaí of his address and sign on once a week at his local garda station.

Outside the court the Anti Racism Network welcomed Mr Safi's release.

It said he should have been in the asylum seeker process rather than prison in the first place.

Mr Safi had been held in Cloverhill Prison for the past three weeks and sustained injuries during disturbances there last week.

Mr Safi is due in court again in September.

It is thought he will be taken to a reception centre run by the Office of the Refugee Applications Commission, although this has yet to be confirmed.