They were the tortured souls incarcerated in the world’s first mental asylum.

The uproar, chaos and barbarism that surrounded them gave the place its famous nickname, which has resonated for centuries as a byword for madness – Bedlam.

Now the ‘lost souls of Bedlam’ are giving up their dark secrets, yards from one of London’s busiest railway stations.

Hundreds of skeletons, including the remains of patients from what was officially called Bethlem – or Bethlehem – Hospital, have been discovered in an old graveyard a few feet beneath the ground at Liverpool Street station on what is now part of Europe’s biggest building site.

It is thought the works, for the £15billion Crossrail project, will eventually yield up to 4,000 bodies, some dating back 450 years.

The graveyard, built on the Bethlem Hospital’s vegetable patch in the 1560s after churchyards around the city started to overflow, was used to bury London’s poor and religious non-conformists as well as inmates from the asylum.

Bethlem, whose name quickly became pronounced ‘Bedlam’ by Londoners, was founded in 1247 by Simon FitzMary, a wealthy former Sheriff of London, as a priory dedicated to St Mary of Bethlem.

By 1403, the majority of its patients were lunatics. Others suffered from epilepsy, learning disabilities and dementia.

Inside the squalid single-storey building that housed 12 cells, a kitchen, staff accommodation and an exercise yard, inmates were manacled and chained – and treated as a tourist attraction by Londoners who paid a penny to stare at them. Patients, usually poor, were given treatments including restraint, dousing with water, beatings and isolation.

Conditions inside Bedlam were depicted by William Hogarth in his 18th century drawings “A Rake’s Progress”, charting the decline of a merchant’s son from wealthy heir to asylum inmate, via debtor’s jail.

In 1676, the asylum moved to nearby Moorfields, then in 1815 to Southwark. Now called “The Bethlem Royal Hospital”, it has been in Beckenham, Kent, since 1930 and is part of the South London and Maudsley NHS Trust.

At the Crossrail site, it will not be possible to distinguish Bedlam patients from other dead, as mental illness will not have left any physical scars on the skeletons.

In most cases, identification will be difficult, if not impossible, because although some were buried in coffins, any name plates recovered have been too rusty to read.

The dig’s manager, Nick Elsden from the Museum of London Archaeology, is part of a team of more than 100 archaeologists who are examining each of the 40 sites being dug up for Crossrail, the 73-mile rail line that will link the City, Canary Wharf, the West End and Heathrow to commuter areas east and west of London.

Mr Elsden said: ‘This site is a rare, perhaps unprecedented, opportunity. This is a major roadway outside one of London’s busiest railway stations. You don’t get to dig that up normally. Everyone’s been running around Liverpool Street for years not thinking they are walking around on bodies from one of the densest burial grounds in London.’

The bones, some from children, will be examined for clues as to how their owners lived and died.

There is already evidence that some suffered from rickets. It is thought other bones will bear the scars of late-stage syphilis.

Other finds at Liverpool Street include the project’s first piece of gold – a 16th century Venetian coin. It had been pierced, so it is likely to have been worn as a pendant.

The site also holds earlier secrets. Some 11ft below the skeletons lie the remains of a Roman road studded with 2,000-year-old horseshoes – hoof-shaped ‘sandals’ made of metal and secured by leather strapping. Roman coins have also been found, one from around AD130 depicting the Emperor Hadrian.

Matthew Symonds, editor of Current Archaeology magazine, said: ‘What’s wonderful about this graveyard is that you are looking at a cross-section of society.

‘Historical records will be from the more educated and better off sections, but this is something that tells us how everyday people lived their lives. That kind of glimpse into the past is invaluable.’