Archaeologists have uncovered a series of 17th century witchmarks which are believed to be connected to the Gunpowder Plot.

Discovered in a room in the National Trust property Knole in Kent, the marks lay hidden for centuries.

The find comes as part of a five-year project, supported by Heritage Lottery Fund, to conserve Knole, which was built to accommodate royalty.

Using dendrochronology, or tree ring dating, archaeologists from the Museum of London Archaeology (Mola) dated the marks to early 1606 and the reign of King James I.

A National Trust spokeswoman said: "A few months before the marks were engraved the infamous Gunpowder Plot of 1605 had caused mass hysteria to sweep across the country.

"Accusations of demonic forces and witches at work were rife.

"The marks at Knole were found on beams and joists below the floorboards and on fireplace surrounds in the Upper King's Room.

"Experts believe that craftsmen working for then owner of Knole Thomas Sackville carved the marks in anticipation of a visit from King James I with the intention of protecting him from evil spirits."

The carved intersecting lines and symbols, also known as apotropaic marks, were thought to form a "demon trap" warding off evil spirits and preventing demonic possessions, according to the Trust.

Mola buildings archaeologist James Wright said: "King James I had a keen interest in witchcraft and passed a witchcraft law making it an offence punishable by death, and even wrote a book on the topic entitled Daemonologie.

"These marks illustrate how fear governed the everyday lives of people living through the tumultuous years of the early 17th century.

"To have precisely dated these apotropaic marks so closely to the time of the Gunpowder Plot, with the anticipated visit from the King, makes this a rare if not unique discovery.

"Using archaeology to better understand the latent fears of the common man that were heightened by the plot is extremely exciting and adds huge significance to our research about Knole and what was happening at that time."

National Trust archaeologist Nathalie Cohen said: "It's wonderful to be able to piece together the forgotten stories of those who lived and worked at Knole and to share them with our visitors.

"This is that once-in-a-lifetime chance to unravel the history of one of the largest houses in the country, from the rafters to the floorboards."

The Trust said the find is part of investigative work that will continue throughout the house until 2018.