Many travellers may recognise the temptation. You arrive at the boarding gate and are told you’re late. The plane’s doors have closed – you’ve missed your flight.

But the plane is still there, almost close enough to touch. If you could just get through the door and attract the pilots’ attention maybe somehow, miraculously, it’s not too late.

A would-be passenger at Dublin airport succumbed to that fantasy on Thursday morning when he ran out of the departure area at terminal one and tried to flag down his Ryanair flight to Amsterdam.

“He was banging on the window to try to get the aircraft to wait and he then broke through a door and made his way on to the apron, trying to flag the aircraft down,” said an airport spokesman.

“He was initially restrained by Ryanair staff on the apron and airport police, who had already been contacted, arrived on the scene almost immediately and arrested him.”

The man, who was not immediately named, was in his 20s.

He arrived late with a female passenger at the boarding gate at about 7am after the flight had closed, said the airport spokesperson. “They were engaging with Ryanair staff at the gate and the male passenger was becoming agitated.”

He banged on the window then broke through a door before heading towards the plane. Airport police, who had previously been alerted, arrived swiftly and reportedly pinned him to the ground after a scuffle.

Moments earlier he’d been inside banging on the window of the terminal asking ground crew to hold the plane. He somehow made it out to the Ryanair aircraft which was taxiing. When police arrived there was a scuffle and he was pinned to the tarmac. 2/... @BBCNewsNI pic.twitter.com/mzEbD6fHyw — Declan Harvey (@NewsDeclan) September 27, 2018

He has been arrested and is being detained at Ballymun garda station. He was due to appear in court later on Thursday.