A bit of publicity on the local news always helps, and it was an item on the television about a ghost being spotted by staff at a former Somerset prison that got me in the car to go and visit it. Now, I have to say upfront that I don’t believe in ghosts in any way, shape or form (I annoy anyone I watch Most Haunted with by hooting with laughter for much of it), but it was the mention that the prison was open to visitors for a limited time before being redeveloped that made me drop my work and travel down to the south-west.

HMP Shepton Mallet, located near the centre of the Somerset town, closed in 2013 after a four-century history, and is due to be developed into flats (the BBC has covered consultations into its future). However, until works begin next year, the prison is being opened on a regular basis for public tours. These are run by Jailhouse Tours, which bills itself as providing the ‘most immersive tours’ of recently closed jails (it also runs similar tours of Shrewsbury and Gloucester prisons).

Don’t be concerned about the word ‘immersive’, however. Although the company offers a fully-guided two hour trip round the prison, accompanied by a former prison officer, you can also wander round on your own, if you prefer – and in this case, ‘immersive’ simply means wandering round wherever you want, in a prison where few concessions have been made for the dark tourist, which is, in my opinion, a good thing.

Those former prisons that have been permanently opened up to visitors inevitably shape, curate and present a certain narrative, with various levels of success. For every Kilmainham Gaol – where, although there are exhibitions and guides, you still get a clear sense of the bleakness and tedium of life inside – there is a Littledean Jail (porn and titillation in a former House of Correction). But here, you see a prison in varying levels of decay, abandoned and left as it was, with different stages of its history exposed.

There is damp and mould; peeling walls and smells emanating from the urinals and showers. You can crawl into a 17th century cell – rediscovered years after being boarded up – or visit the 20th century gymnasium. You see the changing nature of criminal justice, the inhumanity of aspects of prison life, and sense how horrific it must have been to be in the exercise yard, in the fresh air, yet surrounded by the high walls and barred windows of the prison on all sides.

It’s not cheap to visit; and if you want everything explained to you via flashy interpretation boards, don’t go (here, things to look at are pointed out on laminated sheets of A4 stuck on doors, due to the temporary nature of the tour). But the staff are both welcoming and genuinely interested in the site, and there’s free tea and coffee in the old visiting rooms… and, more importantly, it’s a rare opportunity to see so many centuries of criminal history before the developers take over.

This slideshow requires JavaScript.