Complex sentence: The Detention Barracks remained in the possession of the Irish Army until 1972 when the prison buildings were handed over to the Department of Justice for use as a civil prison.
Split into simpler sentences: The Detention Barracks remained in the possession of the Irish Army until 1972. The military prison buildings, previously part of the broader barracks, were handed over to the Department of Justice for use as a civil prison.