One of Britain's toughest prisons and former home to some of the UK's worst sex offenders has been opened to public -as a museum.

Victorian Peterhead Prison in Aberdeenshire was the scene of notorious riots in 1987 which had to be quelled by the SAS after a prison officer was taken hostage.

The prison- nicknamed the 'hate factory'- stood for over a century from 1887 until it made way for a new "superjail" in 2013.

It was designed to hold 208 inmates but occupancy would average at around 350 and in 1911 peaked at 455.

In its later years it became the centre for Scotland's sickest criminals, including sex offenders, child killers and paedophiles including serial killer and child rapist Peter Tobin, 'limbs in the loch' murderer William Beggs and Glasgow gangster Arthur Thompson.

A new museum at the old site of the jail now tells the story of the staff who had to put up with vile and violent offenders.

Alex Geddes, the facilities development co-ordinator in charge of the museum, said: "It's our most notorious prison and housed our worst criminals so it's a fascinating insight into what life was like for those who worked here.

"In the main, we focus on the staff that had to deal with the conditions and the prisoners over the years.

"The most alarming case which always stands out to us is when the SAS had to be called in for their only ever domestic siege when a prison officer was held hostage in 1987.

"Ever since it opened, not a whole lot changed unfortunately. It used the same ventilation system throughout its history."

Among the prison's darkest corners is a chilling, mould-ridden 'silent room' - unused for a decade - where prisoners were kept in solitary confinement on bread and water rations.

Prisoners were offered little comfort as they were crammed into tiny 7ft by 5ft spaces until the late 1970s.

The prison's most notorious chapter came in 1987 when 50 prisoners, sick of their conditions, took a prison officer hostage and control of Block D.

The stand-off continued for five days until Prime Minister Margaret Thatcher lost patience and ordered the SAS to storm the building and rescue the officer.

On the day it closed its doors for the final time in 2013, Deputy Governor Stuart Campbell described the jail's unique history.

He said: "It went through some really turbulent, difficult times in the 80s and the beginning of the 90s when we had some of Scotland's most notorious offenders.

"I don't want the picture of Peterhead always to be painted that it was Scotland's worst jail, with the worst criminals in history.

"We had a proud tradition with the work that we actually did up here."

The museum opened its doors to the public for the first time at 10am today.