A jury has seen footage of an NHS worker showing police a bag containing a homemade bomb outside a hospital.

Mohammed Farooq, 28, whom the prosecution allege had planned to carry out a terror attack on a North Yorkshire air base, also told officers there was a gun on a nearby bench and he had a knife and an axe in his car nearby.

On the footage from police bodycam, he is heard saying the bomb is made from a pressure cooker and has gunpowder inside.

One officer says: “And how’ve you managed to make that then?”

Farooq says: “Just made it, innit.”

The officer says: “Just Googling, yeah?”

Farooq explains that he planned to detonate the bomb by lighting it.

Later, one of the officers says to the defendant: “How long have you been here for? Ages?”

Farooq replies: “Since about 12. Since I bumped into the other guy. He talked me down.”

The prosecution allege that patient Nathan Newby, who was having a break outside the hospital in the early hours of January 20 dissuaded Farooq from exploding the bomb and the bomb was viable.

Read more: the patient's account of what happened outside the hospital

Farooq eventually allowed Mr Newby to use his phone to call 999 and armed officers arrived at the hospital soon afterwards, the court heard.

The prosecution claims that Farooq initially planned to attack RAF Menwith Hill near Harrogate, but after going to the base a couple of times decided to change his target to St James Hospital in Leeds, where he was arrested.

Farooq denies preparing acts of terrorism, although he has admitted a number of other offences including possessing a pressure cooker bomb “with intent to endanger life or cause serious injury to property”.

The prosecution claim he was a self-radicalised terrorist.

The jury has also been told that Farooq had a grievance against several of his former colleagues at St James’s Hospital, where he worked, and “had been conducting a poison pen campaign against them”.

Defence barrister Gul Nawaz Hussain KC has told the court his client was “ready and willing” to detonate the home-made bomb at the hospital because of a “sense of anger and grievance” towards work colleagues but was not motivated by Islamist extremism and not radicalised.

The trial continues.