A Libyan flight with 111 passengers and seven crew members on board was diverted to Malta after it was hijacked on Friday, Reuters reported. All hostages were later released in a phased manner after which the hijackers surrendered to the security personnel who took the duo into custody, Prime Minister Joseph Muscat tweeted.

The hijackers, claiming to be pro-Muammar Gaddafi (a Libyan revolutionary and politician who was killed in 2011), had threatened to blow up the Afriqiyah Airways airbus A320 that was on its way from Sabha to Tripoli, reported Times of Malta. The airport was closed and troops were positioned near the aircraft after it landed.

The hijackers had said they were willing to release all passengers, but not the crew, if their demands were met. Though some reports claimed they had asked for asylum in Malta or a Europe visa, no officials have said this. The men surrendered after declaring their loyalty to Gaddafi. Libya’s Channel TV station quoted one of the hijackers as saying, “We took this measure to declare and promote our new party.”