A member of the Indonesian military stands guard near a Virgin Australia plane which was forced to land at International Ngurah Rai Airport after the pilot sent a distress signal on April 25, 2014 near Denpasar, Bali, Indonesia.

Drunk Passenger Tries to Enter Virgin Australia Jet's Cockpit

A drunk passenger triggered a midair scare when he tried to enter the cockpit of a commercial jet, officials said Friday.

An hour before landing on the resort island of Bali, the Virgin Australia pilot alerted traffic controllers of a possible hijacking, an Indonesian air force spokesman told Reuters.

An airline official later said there had not been an attempt to hijack the aircraft but a "flight emergency" and confirmed that an "intoxicated and aggressively behaved" passenger had banged on the cockpit's door.

Indonesian authorities identified the 28-year-old passenger as Matt Christopher Lockley of Australia, according to Reuters.

Lockley was handcuffed and taken into custody by police after the jet landed. The flight had originated in Brisbane, Australia.

MADE NAGI / EPA

Australian passenger Matt Christopher Lockley is led away by Indonesian military officers at Ngurah Rai International Airport in Bali on Friday.

Eyewitness and mining executive Chris Corless was waiting for a flight at Denpasar Airport as the drama unfolded on the tarmac.

“Security surrounded the plane and then there was some movement then security left and the plane taxied to a normal gate,” Corless told NBC News. “From what I could see the security officials were wearing blue uniforms and it looked like there were approximately 20 of them and there were quite few other authorities around."

Virgin Australia was formerly known as Virgin Blue and is Australia's second-largest airline.