(CNN) -- Two hijackers who took over a plane flying from Sudan's Darfur region on Tuesday and diverted it to Libya surrendered to authorities Wednesday, Libyan state media said.
The hijacked plane took off from near the Darfur refugee camp of Kalma, which was attacked earlier in the week.
The official news agency JANA said the two hijackers surrendered to Libyan authorities in the eastern town of Kufra, where the plane landed, and they were being detained in a hall in the airport there. Their identities were not released.
Earlier, the hijackers had released all 87 passengers aboard the plane, but had held on to six crew members while they negotiated with Libyan officials through the pilot about passage to France, JANA said.
Libyan officials tried to persuade the hostage-takers to surrender as the hijackers demanded fuel to fly the plane to Paris, France.
No details were provided as to how the two surrendered. All of the remaining hostages were freed, and JANA said 20 Sudanese officials were en route to the airport.
Libya will send a plane to return the passengers and crew to Khartoum, Sudan, the plane's original destination, JANA said.
The Sun Air Boeing 737 airliner was about 10 minutes into a flight from Niyala, Sudan, to Khartoum on Tuesday when the pilot called the control tower and told officials the plane had been hijacked and was heading to Kufra, Sun Air airlines official Murtada Hassan Jumaa told the Al-Arabiya news channel.
The hijackers at first wanted to land the plane in Egypt, but the Egyptian government refused them permission, John Ukec, Sudan's ambassador to the United States, said Tuesday.
Khaled Deeb, an Al-Jazeera reporter in Tripoli, Libya, said Libyan authorities allowed the plane to land only because the hijackers said they were low on fuel -- "for humanitarian reasons and nothing else."
"The fact that the plane was kidnapped from Darfur indicates that one of the militant groups may have prepared for this operation, and the fact that they want to go to France adds more to that theory," Deeb said Tuesday. "The hijackers don't have any clear demands except for fuel and then heading to France."
-- CNN's Mustafa Al-Arab contributed to this report