A screaming man tried to storm the cockpit of a Malaysia Airlines jet shortly after takeoff Wednesday night in Australia, but passengers tackled him before he could reach the pilots, authorities and witnesses told NBC News.

Melbourne Tullamarine Airport, Australia's second-busiest airport, was closed for hours overnight as armed tactical officers swept Malaysia Airlines Flight MH128, which had been bound for Kuala Lumpur, as well as the airport, officials said.

An armed tactical officer sweeps a Malaysia Airlines flight at Melbourne Airport in Australia on Wednesday night. Andrew Leoncelli

Inbound flights were diverted, and people planning to meet passengers on arrival were asked to stay home. The airport eventually reopened Thursday morning.

Adam West, senior constable for Victoria state police, said the man never entered the cockpit of the plane, which landed safely after the pilot radioed a request for assistance about 11:40 p.m. (9:40 a.m. ET).

"Malaysia Airlines would like to stress that at no point was the aircraft 'hijacked,'" the airline said in an emailed statement.

David Henderson, a passenger who had intended to fly home to Bangkok, Thailand, told NBC News that the plane was still ascending after takeoff when a male passenger began running up and down the aisle from the back of the plane.

The man, who was screaming as he ran, was restrained by other passengers, Henderson said. The captain announced that the plane would be returning to the airport, where passengers remained on board for more than an hour, he said.

"You can't control crazy people," Henderson said.

Drew Ambrose, a reporter for Al Jazeera who was also on board, told the Australian television network ABC that the man was carrying what appeared to be an electronic device as he ran back and forth.

Ambrose said about a half-dozen passengers stopped the man as he ran back toward the rear of the plane and restrained him with seat belts.

West, the police constable, said that an investigation was under way and that "there appears to be no imminent threat to passengers, staff or public."