A factory worker stockpiled weapons and supplies at his home to prepare for the apocalypse, a court has heard.

Daniel Magee, 39, had spent 20 years collecting items including knives, body armour, camouflage clothing and smoke pellets.

He was arrested after two parcels, ordered from China, were intercepted at Royal Mail's International Logistics Centre in Berkshire in October last year.

One of the parcels purported to contain an "outdoor tool" but had two flick knives inside, while the other claimed to hold a "door handle" but was in fact a baton.

Magee was arrested at his home in Southmead, Bristol, and directed police officers to a box containing a "significant collection of weapons".

These included three stun guns, swords, knives, crossbows and crossbow bolts, knuckle dusters, body armour, holsters, camouflage clothing and smoke pellets.

Officers also discovered 14 Kinder eggs containing gun powder and ammunition in his bedroom drawer.

Judge Peter Blair QC, the Recorder of Bristol, sentenced Magee to 12 months in prison suspended for 18 months.

"Your motivation appears to be a misplaced fascination with weaponry and preparing a stockpile for if anarchy broke out in the country and a doomsday scenario played out," the judge told Magee, who appeared via video link from prison.

"You have obviously had time to reflect while you have been in custody about how foolish and stupid you have been getting yourself into this position."

The judge ordered Magee to carry out eight days of rehabilitation activity and imposed a three-month curfew between 7pm and 6am.

Magee was also ordered to pay a £149 surcharge and £250 towards prosecution costs.

The parcel containing the flick knives, ordered from China to the home address of Magee's mother, was intercepted on October 14.

A week later, the package containing the baton was intercepted at the same logistics centre.

Officers from Avon and Somerset Police attended Magee's home on Shetland Road on December 28 and arrested him.

"Police officers found a significant collection of weapons," Richard Posner, prosecuting, said.

"That collection was in a box, a large box because it contained over 100 items of interest.

"The items in his home were predominantly lawful."

In interview, Magee explained that he had been collecting such items for the past 20 years.

When asked if he had any explosive devices, Magee told officers there were 14 Kinder eggs containing gun powder and ammunition in a bedroom drawer.

People living in eight neighbouring properties were evacuated for two days while the Army's explosive ordnance disposal team searched Magee's home.

More than 50 police officers were involved in the investigation, with over 10,000 electronic files searched to establish his motivation.

Mr Posner said the Kinder eggs did not contain fuses but were capable of exploding if they were "thrown into a fire".

"Despite having acquired a manual explaining how to make explosives, there was no other purpose for making explosives and collecting weapons other than to prepare for what seems to be some sort of doomsday," he told the court.

Representing Magee, Richard Hall described how his client had been an "enthusiastic collector" and shared his passion with others he was "in communication with".

Mr Hall said Magee had "simply given no thought" as to the alarm bells that would ring for those who came across his collection.

"He is enormously sorry and ashamed," Mr Hall said.

He added that Magee did not realise he had ordered flick knives, as the items were described as "stainless steel knives" online and on their packaging.

Magee, who has no previous convictions and has been in custody since his arrest in December, admitted four charges at Bristol Crown Court in February.

These were making an explosive substance, possessing three stun guns and two counts of importing prohibited items, namely the baton and flick knives.

Speaking after the case, Detective Inspector Ben Lavender said: "Daniel Magee's reckless actions jeopardised not only his own safety but also put innocent people in the surrounding area at risk too.

"Officers worked as quickly as possible to establish there was not a wider danger to the public."

He thanked those evacuated from their homes for their "patience and understanding".