Egypt's top court has ordered a retrial of three al-Jazeera journalists jailed on charges of spreading false news.
The decision was made after the hearing in Cairo of an appeal by the three, Peter Greste, Mohamed Fahmy and Baher Mohamed, against their conviction.
Prosecutors acknowledged major problems with the verdict, defence lawyers said. A new trial will occur within a month but the trio must stay in custody.
Al-Jazeera called on the authorities to release its journalists quickly.
The journalists deny the charges, which included collaborating with the banned Muslim Brotherhood after the overthrow of President Mohammed Morsi by the military in 2013.
They say they were simply reporting the news.
Two of them are foreign nationals - Peter Greste, a former BBC correspondent, is Australian, and his producer colleague Mohammed Fahmy holds Egyptian and Canadian citizenship.
The three journalists have now spent a year in jail since they were first arrested in December 2013.
They were convicted in June - with Fahmy and Greste jailed for seven years and Mohamed for 10 years.
Judges have ruled that they should remain in custody until the new trial.
At the scene: Orla Guerin, BBC News, Cairo
The fate of the journalists, who have spent more than a year in a high security prison complex, was decided in a matter of minutes.
The media never made it inside the courtroom for the brief hearing. By the time the police let reporters into the courthouse the judge had concluded the hearing.
Defence lawyers and relatives waited for the verdict in a packed corridor. When it came Peter Greste's elderly parents, Lois and Yuris, looked stunned. Just minutes earlier Mohammed Fahmy's lawyer, Negad Al Borai, had been confidently predicting that all three defendants would be released on bail.
Outside court relatives warned that trio could face another lengthy battle, with a retrial lasting as long as a year.
Marwa Omara, fiancee of Mohamed Fahmy, said he would continue his fight for justice and for freedom of the press. Wiping away a tear, she said she and Mohammed would go ahead with their plans to marry - if necessary behind bars.
'Hoped for more'
Thursday's court session began at 09:00 local time (07:00 GMT) and lasted just 30 minutes. None of the defendants were present.
An Al-Jazeera spokesman said in a statement after the decision: "Baher, Peter and Mohammed have been unjustly in jail for over a year now.
"The Egyptian authorities have a simple choice - free these men quickly, or continue to string this out, all the while continuing this injustice and harming the image of their own country in the eyes of the world. They should choose the former."
Reacting to the hearing, Greste's mother Lois said: "We need some time to process. It's not as positive as we had hoped."
Fahmy's brother Adel said he had "hoped for more" - that his brother would be freed, at least on bail.
But Greste's lawyer Chris Flynn described the decision as being "a positive result".
"It's not the complete vindication that we were hoping for of course," he told the BBC.
"It does, however, recognise... that the original trial processes contain some flaws... and we think overall provides an opportunity for the president to consider perhaps some other measures such as deportation without any further judicial action in Egypt.
"We trust and hope that that will be the approach that's taken."
- 29 December 2013: Peter Greste, Bader Mohamed and Mohammed Fadel Fahmy arrested
- February 2014: Put on trial in Cairo on terrorism-related offences
- 23 June: Convicted and jailed for seven to 10 years
- 23 December: Al-Jazeera suspends its Egyptian channel
- 1 January 2015: Retrial ordered after "major problems" found in verdict
The BBC's Orla Guerin in Cairo says that the case has been hugely damaging for Egypt, and there have been indications that the authorities want to bring it to a close.
A recent thaw in relations between Egypt and Qatar - which owns the Al Jazeera channel - heightened expectations that the case would be resolved, our correspondent says.
But today's verdict means the journalists will remain behind bars at least until the first hearing of their new trial - which is expected to take place within a month. Lawyers say they will then apply for bail.
In December al-Jazeera decided to suspend its Egyptian channel, Mubasher Misr (Live Egypt), whose coverage had become a major source of tension between the two countries.
Analysts speculated that the channel's suspension might ease the way for Egypt to free the two foreign journalists in line with a recently-approved law that allows foreign citizens to be deported rather than jailed.
President Sisi has said in the past he wished the journalists had been deported rather than being put on trial.