Lunacy (Ireland) Act, 1821

Such insane criminals shall be detained in the lunatic asylum of the county, when provided.

18. Provided always, that whenever and as soon as there shall be a lunatic asylum built or maintained, either wholly or in part, in any county, county of a city, or county of a town, wherein such prisoner, in any of the cases aforesaid, shall be tried or found insane as aforesaid, then and from thenceforth such insane person shall without delay be removed to such asylum, and shall be kept therein so long as such prisoner shall be detained in custody.