The Sri Lankan man who threatened to blow up a Malaysia Airlines plane departing from Melbourne overnight had been released from psychiatric care just hours before boarding the flight bound for Kuala Lumpur.
The 25-year-old is being questioned by police after attempting to enter the cockpit of flight MH128, which left Melbourne at 11:11pm, brandishing an electronic device he claimed was a bomb.
Victoria Police said they responded to the incident as a terror attack, but it now appears the device was a music amplifier or speakers.
The Sri Lankan national -- who was living in the Melbourne suburb of Dandenong on a student visa and studying to become a chef -- had been released from psychiatric care at Monash Medical Centre earlier that day.
He faces two charges under the Crimes and Aviation Act: making threats and false claims and endangering an aircraft. Both charges carry a maximum sentence of 10 years' imprisonment.
Security has nevertheless been increased at the airport, which is continuing to experience delays after all flights were grounded following the threat, until around 3am on Thursday morning.
It was just 30 minutes into the flight when the "operating Captain was alerted by a cabin crew of a passenger attempting to enter the cockpit", the airline said in a statement.
Superintendent Tony Langdon of Victoria Police said the man had been sitting in economy and left his seat before shouting that he had a bomb.
"He apparently tried to attempt to gain access to the cockpit, and was restrained by passengers and crew," he said.
Former Melbourne AFL player Andrew Leoncelli was on flight MH128 when he heard an air hostess scream out for help.
"I could hear this idiot saying that he wanted to go in and see the pilot," Leoncelli told radio station 3AW.
"The staff were saying 'sit back down, sir. Sit back down, sir'. Then he goes,'No, I'm not going to sit back down, I'm going to blow the plane up'.
"So the staff scream out 'I need some help, I need some help'. So I jumped up, undid my buckle, and approached him. And I said 'Mate, what are you effing doing?'. He goes 'I'm going to blow the f***ing plane up, I'm going to blow the f***ing plane up'."
Leoncelli said he approached the man in an attempt to disarm him. The Sri Lankan, who Leoncelli described as "insane", ran down the back of the plane, where two other men tackled him to the ground and tied him up with belts.
"They took the giant black thing he was carrying out of his hands and then that thing sat on the plane for the next hour and a half as the plane turned around and landed," Leoncelli said.
The terrified passengers and crew then had a 90-minute wait as the flight was grounded, before heavily armed police stormed the plane and arrested the man.
Victoria Police's Chief Commissioner Graham Ashton has defended the time taken to board the flight and remove the man, saying "there wasn't really any delay", despite police taking more than an hour to board the flight from the time it landed.
He told reporters that terror protocols were activated and responded to swiftly and "passengers' safety was paramount at all times".
"There were some initial reports we have received from within the plane of the possibility of there being more than one offender, or more than one explosive device," the Chief Commissioner said.
"If there was an explosive device... the sudden removal of the passengers could cause difficulty.
"Once we were satisfied we were dealing with one offender and a device that was looking increasingly unlikely to be an explosive device, the decision was made to get the passengers off.
"I think that entire time was about 90 minutes, but I certainly appreciate that when you are on a plane in that situation, one minute can seem like an hour."
Victorian Premier Daniel Andrews also spoke out in defence of police efforts.
"Of course everyone involved in such an incident wants the incident to come to a peaceful and safe and as quickly as possible, but, given a choice between facing these questions versus people having preempted that diligent checking and having stormed in and potentially made a bad situation much, much worse, I think I know where we'd all rather be."
Australian Federal Police Superintendent Martin Good said that once on board the plane, police "quickly ascertained" that the package the man was carrying was not a bomb.
"What was in the backpack -- we couldn't describe it as a device. The contents of the knapsack was such that they were able to get through (airport security) and it posed no threat," Superintendent Good said.
Saiqa Chaudhery, whose husband was a passenger on the flight, tweeted to reporters that the man appeared to be under the influence of "drug or alcohol".
Superintendent Langdon commended the "heroic" actions of the passengers who brought the man down.
"They managed to calm the situation, allow the aircraft to return safely and we can't commend them highly enough," he said.
Footage shot by passengers on board the flight and posted to Twitter show armed security personnel boarding the grounded flight.
In a statement released early on Thursday, Malaysia Airlines said "at no point was the aircraft 'hijacked'".
"MH128 safely landed in Melbourne airport at 11:41pm.
"Following the incident on MH128, the disruptive passenger has been apprehended by airport security. Malaysia Airlines together with the Australian authorities will be investigating the incident."
Melbourne Airport is still experiencing delays, as one of its two runways was closed until mid-morning on Thursday. Additional security presence by the Australian Federal Police remained in place on Thursday.
Inbound flights were diverted and airfield operations suspended for a number of hours, according to the 24-hour aviation monitoring website Flight Radar. It is understood that flights recommenced at around 3am.
The flight's passengers and crew were interviewed by police throughout the night and are now being provided with accommodation and rescheduled flights.
Federal Transport Minister Darren Chester said the incident was "extremely worrying" and the incident would be investigated by his department to ensure all the necessary security measures were in place.
"There is no suggestion at all that the security arrangements didn't work in terms of screening of luggage, screening of passengers," he said.
"We do have world class security arrangements at our airports here in Australia."
ALSO ON HUFFPOST AUSTRALIA