A pensioner wandered into a court building with a gun in his shopping bag.

Shocked security staff had to march the elderly man to a nearby police station after he had tried to enter Mid Sussex Magistrates’ Court in Haywards Heath with the weapon.

Police firearms officers destroyed the pistol, which fired metal pellets, after it was handed in last Tuesday morning.

Figures obtained by The Argus reveal the gun was just one of thousands of offensive weapons seized in Sussex courts in the past three years.

Knives, guns and even sex toys have all been confiscated by security staff.

One person was found with 150 hypodermic needles in a package along with a substantial amount of heroin.

Another man released on bail for a violent offence turned up for his court date with a Stanley knife in his back pocket.

A source at one Sussex magistrates’ court said: “Staff see this every single day. Even when people are on trial they still come to court with knives even though everyone has to pass through a metal detector.

“One woman even brought in a strangely shaped sex toy which had to be confiscated.

"Many people simply don’t realise what they are doing.

“We find it very difficult to understand why anyone would decide to bring these items to court.”

The figures revealed 2427 knives and six replica guns have been seized by security staff along with thousands of tools, cameras and bottles of alcohol since 2009.

Other banned items found in court buildings include drugs, solvents and objects that could cause harm to others or disrupt court proceedings. Data was collected from 14 courts across the county including those in Brighton, Worthing and Crawley.

Hove MP Mike Weatherley said he was “shocked” by the figures.

He said: “It’s a huge concern that these dangerous weapons have been taken into courts.

“It shows a huge disregard for our laws and more importantly a disregard for the penalties. We should be looking at proper deterrents to make sure this doesn’t happen.

“It’s good news that the systems appear to be working but I’m concerned about the weapons that may have slipped through.

“Too many people are carrying knives and the Government needs to get tough on these thugs.”

A Courts and Tribunals Service spokesman said: “We take the issue of security within courts extremely seriously and have a rigorous system in place, including mandatory bag searches, bag scanners, metal detectors and surveillance cameras, to ensure the safety of all court users.”