Security staff allowed a man who tried to carry a "crude but viable" nail bomb onto a plane to return home and then board a later flight.
Nadeem Muhammad, 43, from Bury in Greater Manchester, was stopped in January as he tried to board a plane at Manchester Airport for a flight to Bergamo, Italy, when airport scanners detected the device.
After he was questioned and no explosives were detected by swabs of the device, Muhammad was released and went home after police confirmed his identity. Five days later, he was allowed onto another Ryanair flight to Bergamo for an 11-day stay.
Meanwhile, forensic experts conducted further tests on the confiscated device, which did find explosives, and Muhammad was arrested on his return.
Forensic investigators found the improvised pipe bomb was to be combined with an explosive propellant contained in the barrel of a marker pen. This was linked to three batteries and wires that could detonate the device when joined.
Jonathan Sandiford, prosecuting, told Manchester Crown Court: "It is a matter of common sense that the only reason he would have tried to get that device onto the aeroplane was that he intended to detonate it in the confines of the Boeing 737, endangering the lives of the passengers on board and causing damage to the aircraft itself."
Muhammad, who is originally from Pakistan, but has Italian citizenship, denies possession of the bomb with intent to endanger life and possession of the bomb in suspicious circumstances.
The trial continues.