A drunk passenger who tried to break into the cockpit and caused a hijack scare aboard a flight from Australia to Indonesia was arrested on Friday.

The pilot of the aircraft alerted air traffic controllers of a possible hijacking attempt after the intoxicated passenger banged on the cockpit door trying to get in, according to Reuters.

A Virgin Australia Airlines official later clarified that there had not been an attempt to hijack the plane but that there was a "flight emergency."

"There was a drunk passenger, intoxicated and aggressively behaved. He was trying to enter the cockpit, banging the door but he did not enter the cockpit," Heru Sudjatmiko, airport manager for Virgin Australia in Bali, told Indonesia's Metro TV.

The passenger, identified as 28-year-old Matt Christopher Lockley of Australia, was seized by crew members and arrested by authorities a short time later.

The plane, which was traveling from Brisbane to the Indonesian resort island of Bali, landed safely. All 137 passengers and six crew members aboard the flight were unharmed.

"The suspect is being interrogated by police in Bali," said Suhardi Alius, a police official in Jakarta.

A flight attendant told police that the Lockley appeared "paranoid," Reuters reported.

Police told media that Lockley is in unstable condition and blood samples were being taken to test for alcohol and drugs.

Ngurah Rai International Airport, also known as Denpasar International Airport, in southern Bali was temporarily closed as a result of the incident, but airport operations have returned to normal.