After the Reformation, St Giles' was internally partitioned to serve multiple congregations as well as secular purposes, including as a prison, and as meeting places for the Court of Session and the Parliament of Scotland.