JAKARTA, Indonesia — A drunken passenger who caused a hijack scare on a Virgin Australia flight by trying to break into the cockpit was arrested Friday after the plane landed on Indonesia’s resort island of Bali, officials said.

The airport was closed for nearly two hours because of the incident, forcing several flights to be diverted, air force base commander Col. Sugiharto Prapto said.

The Australian passenger acted aggressively and began pounding on the cockpit door before being handcuffed by the crew, police said. He was arrested for creating a disturbance and investigators said they were waiting for him to sober up before questioning him.

The passenger was identified by authorites as Matt Christopher Lockley.

Bali police chief Maj. Gen. Benny Mokalu told reporters that after the man began beating on the locked cockpit door, the pilot issued an alert code to air traffic control. The crew then managed to restrain the man and put him in a rear seat for the remaining hour of the flight.

Prapto said the plane was directed to park at the end of the runway in case explosives or weapons were involved. Scores of troops surrounded the jet.

“We immediately took appropriate security measures involving troops because the initial information that we got was that the plane was hijacked,” Prapto said.

He said air force troops approached the plane and took the man into custody.

The Boeing 737-800 was carrying 137 passengers and seven crew members from Brisbane, Australia, to Bali, which is a leading tourist destination for Australians.

No passengers or crew were hurt in the incident, according to the airline.