The castle has been at the heart of Norwich for a millennium, perched atop a huge mound that gives clear views of the city as it changes and grows.

It was built in 1067 as a home fit for a king but was quickly transformed into a prison which housed local criminals for hundreds of years and was the site of dozens of executions.

Now people have the chance to see what life was like for those inmates by visiting a new exhibition that shows how the building ran as a Victorian prison.

The Prison Stories Gallery opened to visitors in the summer but was officially launched last night with the unveiling of a new film.

The movie uses vivid computer models developed by Dr Andy Day at the UEA to bring recent research about the castle's history as a prison to life.

The exhibition also includes death masks taken from executed murderers, 17 of whom are buried at the castle, and a Victorian murder weapon.

The small pistol which was used by William Abigail to murder Jane Plunkett on April 25 1882 serves as a macabre reminder that the prisoners' crimes had real victims.

Dozens of documents including a prison bible and broadsheets sold at executions feature are also on show, but perhaps the most arresting exhibit is a realistic mock-up of a Victorian prison cell.

Inside the tiny and cold 10ft by 6ft room there is a small stool and a shelf big enough for the few possessions allowed for inmates; a bowl, cup and bible.

Instead of a bed there was a hammock which could be rolled away during the day to make space for the occupant to carry out hard labour.

There was no toilet, but just a metal bucket emptied daily, and on the wall hung a cautionary sign that read 'Be sure your sins will find you out'.

Speaking at the launch of the exhibition yesterday Emma Taylor, Norwich Museums development officer, said that the film would serve as a powerful tool for showing how the building had been used over the centuries.

'The castle was a jail from the medieval period and we wanted to show the artefacts and documents we've got and really talk about the people. We think prisons are interesting because of the people,' she said.

'The shape of the museum as it is today is basically the jail.

'Our VIP room, which is very posh, is where the treadmill was. In the Victorian period work was a big part of what you did in prison. They were mostly pretty grim, dreary jobs they did.

'It was built as a Norman royal palace but it very soon became a jail. It's been a prison for most of its history.'

James Carswell, cabinet member for cultural services at Norfolk County Council, said: 'Our museums have a fantastic track record at making history entertaining and educational.

'This latest exhibition really fires up people's imaginations, breathes life into some of the castle's notorious former inmates, and shows people of today what life was really like as a prisoner in the castle.'

Two of Norwich Castle's most famous inmates were Henry and Susannah Kable, two local burglars who went on to lead respectable lives in Australia.

Henry Kable was sentenced to death on February 1 1783 for burglary. This was later reduced to transportation to America, but changed to Australia because of the American war of independence.

Susannah Holmes was also in the prison awaiting the death penalty for burglary, but was granted a pardon and given a sentence of transportation.

The pair met and struck up a relationship in the prison, having a son there who they named Henry Kable junior.

After sailing to Australia the couple married and Henry opened a hotel, became a constable of police and eventually rose to chief constable.

He went on to have a successful and lucrative career as a businessman and farm owner.

The couple had 11 children and today many hundreds of their descendants survive all over the world, many of whom have visited Norwich Castle Museum.William the Conqueror ordered work on the castle to start in 1067 and almost 100 Saxon homes were demolished to make way for it.

A large keep was added some time around 1100 to serve as a royal palace, but just 120 years later the building was turned over for use as a jail.

After hundred years the jail was moved out of the Castle in the 1880s and John Gurney, from Sprowston, put up the then considerable sum of �5,000 to help move the existing Norfolk and Norwich Museum into the building from its home on St Andrews Street. In 1884 architect Edward Boardman drew up plans which retained the old buildings, because: 'If they will hold prisoners they will hold dead birds'.

He finished the plans four years later and models made of sand were produced so that Mr Gurney, who was blind, could inspect them by touch. The castle has been a museum and art gallery ever since, gradually adding to its exhibits over the years.

Today visitors can tour the castle's keep and battlements, as well as visiting the galleries inside.

For more information visit www.museums.norfolk.gov.uk or call 01603 493625.