A man who attempted to smuggle a pipe bomb onto a plane was allowed to fly again days later because police did not realise the device was viable, a court has heard.

Nadeem Muhammad, 43, was attempting to board a flight to Bergamo, Italy, on January 30 when security officers at Manchester Airport found the device, made from batteries, tape, a marker pen and pins.

Jonathan Sandiford, prosecuting, told the trial at Manchester Crown Court Muhammad had intended to detonate the device once on board the Ryanair flight.

Nadeem Muhammad, was attempting to board a Ryanair flight to Bergamo, Italy from Manchester airport when the pipe bomb was found

But the court heard when airport security swabbed the bomb there was no trace of explosive on the outside and officers did not believe it was a viable device.

Muhammad, who was born in Pakistan but had an Italian passport, was questioned by police but not arrested and on February 5 boarded another flight to Italy.

Mr Sandiford said: 'At that stage nobody had realised this was a real device and the defendant was allowed to go on his way.'

He said it was only on February 8 when the device was examined again that suspicions were raised and the bomb squad was called.

The explosive was then sent for examination by expert Lorna Philp, who found it was a 'crude but potentially viable improvised explosive device'.

Muhammad was arrested when he returned to the UK on February 12.

Mr Sandiford said the explosive, which experts said would have been 'unreliable' and 'unpredictable', was made up of batteries, the barrel of a marker pen, pins, and double base smokeless propellant normally found in firearms ammunition.

Manchester Crown Court (pictured) where he denied possession of explosives with intent to endanger life or property and an alternative charge of possession of explosives under suspicious circumstances

If wires, protruding from either end of the tube, had been connected to each other the device would have detonated.

Mr Sandiford said: 'The prosecution say that on January 30 this year the defendant attempted to carry an assembled and viable improvised explosive device through security at Manchester Airport and onto the Ryanair flight with which he was booked to fly to Bergamo, or Milan, in Italy.

'The only reason he would have for trying to get that explosive device onto the aeroplane was that he intended to detonate it within the confines of the Boeing 737 aircraft.'

The device was spotted by officers carrying out routine searches at the airport and was found within the zip lining of the small green suitcase Muhammad was carrying.

When initially questioned he said the device may have been placed into his bag by his wife or another person.

Mr Sandiford said the prosecution could not be sure if terrorism was the motive.

He said: 'That may be the most likely motive but equally it could be a desire to commit suicide or another purpose altogether.'

He said the defence were expected to argue that the explosive was placed into Muhammad's luggage by an unknown person and for an unknown reason.

Muhammad, of Tinline Street, Bury, denies possession of explosives with intent to endanger life or property and an alternative charge of possession of explosives under suspicious circumstances