Egypt's top court Thursday ordered a retrial of three Al-Jazeera reporters whose imprisonment on charges of aiding the Muslim Brotherhood triggered global outrage, but kept them in custody pending a new hearing.
Australian Peter Greste, Egyptian-Canadian Mohamed Fahmy and Egyptian Baher Mohamed of the broadcaster's English service were detained in December 2013 for spreading false information.
Greste and Fahmy each got seven years, and Mohamed was jailed for 10.
"The Court of Cassation has accepted their appeal and ordered a retrial," Greste's lawyer Amr al-Deeb said Thursday.
The defendants were not at the hearing, which lasted just 30 minutes.
Hopes for their release have grown since a thaw in diplomatic relations between Egypt and Qatar, where Al-Jazeera is based.
"I hope the reconciliation efforts between Egypt and Qatar continue for the sake of my brother and his colleagues... who are paying the price of a political crisis," Adel Fahmy told reporters.
Both the defence and the prosecution had requested a retrial.
Greste's parents told Australia's ABC News they were "shocked" by the decision.
"This was always on the cards but even though we have learnt not to expect anything, or (to) expect the unexpected, we did expect a little bit better than this," his father Juris Greste was quoted as saying.
Australian Foreign Minister Julie Bishop was more upbeat.
"He is now back in the position of an accused person awaiting a trial," she told Australia's Nine Network in comments reported by the AAP news agency.
"So that opens up a whole raft of new options for Peter and his family."
Mohamed's wife Jihan welcomed the retrial as a "small but positive step towards my husband being freed".
"This past year has been the worst year of my and my children's lives," she added.
Al-Jazeera called for the swift release of its employees.
Acting director general Mostafa Souag said they had been "unjustly imprisoned".
"Their arrest was political, the sentencing was political and their being kept in prison is, for us, political," he said.
- 'Unjustly imprisoned'-
The reporters, who authorities say lacked proper accreditation, were sentenced in June for aiding the Brotherhood after the army ousted Islamist president Mohamed Morsi in 2013.
Signup to our newsletter and follow us on Facebook and Twitter!
The Brotherhood, which saw electoral success after the overthrow of longtime strongman Hosni Mubarak in 2011, has since been declared a "terrorist organisation" in Egypt.
Analysts called the retrial a step towards the release of the journalists.
"The question is now about time... how quickly will the retrial be conducted," H.A. Hellyer of the Centre for Middle East Policy at the Brookings Institution in Washington told AFP.
"It might not be a full acquittal. There are other options, with sentences ranging from time served to suspended sentences. But it is quite likely it will end in their release."
A date for the retrial has not yet been announced.
Defence lawyer Shabaan Saeed said the retrial could begin soon as "the government wants to end the case as fast as possible".
Amnesty International described the detention of the three, whom it considers to be prisoners of conscience, as unjust and said their trial was a "complete farce".
"Their only crime was to challenge the political narrative of the authorities," regional deputy director Hassiba Hadj Sahraoui said.
The reporters were arrested when Egypt and Qatar were at loggerheads after Morsi was removed by then-army chief Abdel Fattah al-Sisi, who is now president.
- Improving relations -
Ties worsened when Qatar, a key Brotherhood backer, repeatedly denounced Morsi's overthrow, prompting Cairo to accuse Al-Jazeera of bias.
At least 1,400 people have died in the crackdown on Morsi's Islamist supporters since his ouster.
The diplomatic row now appears to be ending following mediation by Gulf heavyweight and Sisi supporter Saudi Arabia.
On December 20, Cairo told a Qatari envoy it was ready for a "new era" in relations, as the emirate offered its "full support" to Sisi.
Two days later, Al-Jazeera announced the surprise closure of its Egyptian channel, which had consistently criticised Cairo since Morsi's ouster.
Sisi himself has said he would have preferred the journalists to have been deported rather than tried.
In November, he issued a decree allowing him to deport foreigners sentenced to prison or on trial.
Ahead of Thursday's ruling, Fahmy's fiancee Marwa Omara said: "We have filed a request to the prosecution to deport Mohamed to Canada in case a retrial is ordered."
The court also ordered a retrial for four Egyptian co-defendants jailed for seven years on charges of belonging to a terrorist organisation and for "damaging the image of Egypt".
Eleven other defendants, tried in absentia, including one Dutch and two British journalists, had been sentenced to 10 years.
They would be retried only if they surrendered to the authorities.