Archaeologists have begun excavation work to reveal the remains of a lost medieval castle where Mary Queen of Scots was imprisoned.

Sheffield castle was one of the grandest and most powerful in the north of England before it was demolished by the parliamentarians in 1648.

Its remains were covered by an indoor market in the 1960s – which itself closed five years ago – but its secrets have remained buried deep underground until now.

A team of archaeologists this week started excavating a series of trial trenches in previously uninvestigated areas of the site, which is thought to have been inhabited since at least the 11th century.

Ron Clayton, of the Friends of Sheffield Castle group, said he was delighted work was finally getting under way. “In its day Sheffield castle overlooked the village of Sheffield. This has seen the thunder of war, the rattle of the drum, the blast of the cannon; people have been killed fighting to take possession of this castle,” he said.

“It’s a great day. This is going to give Sheffield a whole new identity in the 21st century.”

The dig, said to be the first comprehensive survey of the Castlegate site, is part of a £786,000 council scheme to revamp the area. It is being led by Sheffield-based Wessex Archaeology North in collaboration with students and staff from the University of Sheffield’s archaeology department.

Mili Rajic, the project manager for the dig, said the forgotten castle was “a very substantial and important building” in the 15th and 16th centuries and was probably the largest stone-built castle in the country at the time.

Mary Queen of Scots was held prisoner there for 14 years between 1570 and 1584, before she was executed in 1587. The castle was then destroyed by parliament following the civil war in 1646.

Wessex Archaeology said its work would take nine weeks, with its findings then shared with Sheffield city council and other interested parties. There are also plans for a virtual reality tour of the castle, with historians hoping for a chance to “see” how the castle looked for the first time in almost 400 years.

Prof John Moreland, who leads the Castlegate project at the University of Sheffield, said: “We’re delighted that the next phase of our research into Sheffield castle is set to start this week. We’ve known about some of the history of the castle and its role in medieval England for quite some time now, but what we don’t know is how much more of it remains on the castle’s site.

“The Castlegate Quarter of Sheffield is due for regeneration, and we believe that the presence of the castle increases the attractiveness of the site for developers. Our work with Wessex North, Sheffield city council and the Friends of Sheffield Castle to look for further remains will mean that the city can use the area’s heritage to plan for its future.”