Kidnappers freed Egyptian police and soldiers in the Sinai on Wednesday, as President Mohamed Morsi vowed to bring the perpetrators to justice and appealed to residents of the lawless peninsula to disarm.
The conscripts, seized at gunpoint last week as they were returning from a leave of absence, arrived in Cairo following a joint army and police sweep of the Sinai that triggered their release, the army said.
The three policemen and four soldiers saluted and embraced Morsi as they stepped out of the plane that flew them to the capital, in a ceremony attended by dozens of senior officials.
"The criminals must be brought to justice. Those who violate the law must be held accountable. The law will prevail," Morsi said in a statement aired on state television after the ceremony.
Presidential spokesman Ihab Fahmy later told a press conference that there were "no concessions nor negotiations" to secure the hostages' release.
Military spokesman Ahmed Aly said "an important reason behind the success of the operation... was a military intelligence plan of strategic deception and media control."
Intelligence "deliberately broadcast conflicting reports on the course of military operations in the Sinai to confound the kidnappers," the official MENA news agency quoted him as saying.
But a Bedouin source close to talks between tribal mediators and the kidnappers said the hostages were released after the kidnappers received assurances they would not be pursued.
A hive of militant activity, Egypt's Sinai peninsula is a major route for drugs smuggling and human trafficking.
Ever since the uprising that ousted Hosni Mubarak in 2011, throwing his feared security services into disarray, the region has grown even more restless and awash with weapons.
Morsi appealed to residents to hand in their arms.
"Weapons should only be with the authorities. Weapons should only be with the state. Those who have weapons should hand them in," he said.
Signup to our newsletter and follow us on Facebook and Twitter!
Morsi said developing the Sinai was a top priority, stressing his eagerness to see residents achieve "their full rights... like the rest of Egyptians".
Bedouin activists have long complained of the government's neglect of the region, saying they have been treated as second-class citizens ever since Israel handed back the peninsula it had seized in the 1967 Middle East war.
Shortly after the news of the release, the Rafah border crossing between Egypt and the Gaza Strip reopened.
Rafah, the Palestinian territory's sole crossing outside of Israeli control, had been closed for five days by Egyptian police angered by the kidnapping of their colleagues.
Egyptian troops and policemen had begun sweeps of north Sinai on Tuesday.
The kidnappers were armed with surface-to-air missiles and heavy machineguns, Interior Minister Mohamed Ibrahim said.
He said on Tuesday there were no negotiations with the kidnappers, who were demanding the release of jailed Bedouin militants, but tribal leaders were working to persuade the gunmen to release the hostages.
The authorities had alerted emergency services of a possible showdown with the kidnappers.
The capture of the security personnel piled pressure on Morsi, the Islamist president whose 11-month rule has been marked by bloody street clashes, political turmoil and a devastating economic crisis.
Tension has been running high in the Sinai since the kidnapping which was followed by two attacks on or near police camps in north Sinai.
On Monday, assailants fired heavy weapons for 25 minutes at a police camp in Al-Ahrash, followed later in the day by another attack on the Oja border crossing with Israel, which is also close to a police camp.
Attacks on police and soldiers in the sparsely populated peninsula have surged since Mubarak's overthrow, as have cross-border attacks on Israel.
In August 2012, suspected Islamist gunmen killed 16 Egyptian soldiers near Israel's border and commandeered an armoured vehicle into Israel, where they were stopped by a helicopter strike.