An Egyptian court Thursday ordered journalists Mohamed Fahmy and Baher Mohamed freed ahead of their retrial on charges that they supported the banned Muslim Brotherhood.
However, the men were still in custody Thursday night, and with government offices closed on Fridays for weekly prayers, their release might not come until Saturday.
News of their pending release comes less than two weeks after Al Jazeera correspondent Peter Greste, a colleague who was convicted with them, was released and deported to his native Australia.
Bail for Fahmy, an Egyptian-Canadian citizen and former CNN producer, was set at 250,000 Egyptian pounds ($32,750). Mohamed, an Egyptian citizen, is not required to pay but is barred from leaving the country ahead of the retrial.
Fahmy's family paid the bail Thursday. The case is scheduled to resume on February 23.
Fahmy, who says he recently surrendered his Egyptian citizenship under coercion to facilitate his ultimate release, addressed the court Thursday, reasserting his innocence and brandishing an Egyptian flag.
Al Jazeera applauded the two journalists' bail but called for their full exoneration.
"Bail is a small step in the right direction, and allows Baher and Mohamed to spend time with their families after 411 days apart," an Al Jazeera spokesman said. "The focus, though, is still on the court reaching the correct verdict at the next hearing by dismissing this absurd case and releasing both these fine journalists unconditionally."
Fahmy, Mohamed and Greste were arrested in Egypt in December 2013, accused of supporting the Muslim Brotherhood and broadcasting footage -- including video of clashes between police and protesters -- that portrayed the regime falsely with the intention of bringing it down.
The journalists have said they were just doing their jobs, covering all sides of the stories in Egypt
All three were convicted last year on charges that included conspiring with the Brotherhood, spreading false news and endangering national security, but they have maintained their innocence. Greste and Fahmy were sentenced to seven years in prison and Mohamed to 10 years.
The three appealed their convictions, and in January their attorneys announced that Egypt's highest court had granted them a retrial.
Amnesty International and other observers have long held that Greste, Fahmy and Mohamed were pawns in a geopolitical dispute between Egypt and Qatar, the small Middle Eastern country that finances Al Jazeera.
Qatar has long been perceived as a supporter of the Muslim Brotherhood.
At the time of their arrest, Egypt was mired in political turmoil surrounding the coup of President Mohamed Morsy
in his Muslim Brotherhood-backed government. After Morsy's ouster, the military, which had staged the coup, declared the longstanding political party a terrorist organization.
Fahmy laments giving up Egyptian citizenship
The deportation of Greste and Thursday's bail for Fahmy and Baher Mohamed follow a recent improvement in Egyptian-Qatari relations.
In December, Egyptian President Abdel Fattah el-Sisi met with a Qatari envoy. Days after that, Qatar shut down an Egypt-based Al-Jazeera affiliate, Mubasher Masr, which Cairo accused of supporting the Muslim Brotherhood.
Greste, Fahmy and Mohamed didn't work for that affiliate, but accusations against the channel were featured in their trial.
Shortly after Mubasher Masr closed, the journalists' retrial was announced.
Greste was released as part of a new Egyptian law allowing the President to deport defendants. Defense lawyers also asked Egypt to deport Fahmy.
In court Thursday, Fahmy said that an Egyptian official told him he would have to renounce his Egyptian citizenship first -- something that Fahmy said he had initially rejected.
"Then I got a call from a leading official in the country, and they told me: 'Mohamed, nationality is not a piece of paper, but it is in the heart. And you can visit Egypt as a tourist and apply for the citizenship again.' "
Fahmy said he surrendered his citizenship reluctantly, adding that it was difficult for him in part because his family has long had proud ties to the military.
He again denied having any connection with the Muslim Brotherhood.
"Our reports were balanced, and had no fabrication or violation," he said.
His brother, Adel Fahmy, said Fahmy was "almost tormented" by having to drop his Egyptian citizenship to be granted a deportation decree from Egypt's President.
Earlier this month, Fahmy's family appealed for his release in part on grounds of his health, saying in a statement published by an Egyptian news outlet that he was ill with hepatitis C and had an injured shoulder.
Fahmy injured his shoulder before his arrest and has complained about not getting proper treatment for the injury while in prison.
Criticizing their detentions
Greste described in a January 2014 letter how he and his colleagues were detained, saying that Interior Ministry officials burst into a hotel room that he and producer Fahmy were using. Officials rushed Mohamed's home, he said.
Egypt is the sixth-leading jailer of journalists in the world, according to a tally conducted in December by the nonpartisan Committee to Protect Journalists.
The jailing and sentencing of the Al Jazeera journalists generated outrage from colleagues and activists around the world. A campaign led by Al Jazeera declared that "Journalism is not a crime."
Many tweeted under the hashtag #freeajstaff and journalists, including Christiane Amanpour, CNN's chief international correspondent, who held up a sign with the campaign on her show.
On Thursday, International human rights lawyer Amal Clooney released a statement after Egypt's Supreme Court issued its reasons for overturning the original verdict and sentence in the case of Fahmy.
"I am encouraged by the Supreme Court's findings that the trial was unfair, and by today's ruling granting Mr. Fahmy bail. At the same time, there is no guarantee that a retrial will be carried out in compliance with international standards or result in the full acquittal on all charges that Fahmy deserves. It may also take several months to complete," Clooney said.
On February 2, Clooney gave CNN a statement regarding Fahmy, who also used to work for CNN.
"I have been in touch with the Fahmy family and we are all delighted that Peter Greste has been released," it said. "As Mr. Fahmy's counsel we are doing all we can to ensure the same outcome for Mr. Fahmy, who has suffered the same injustice."
Fahmy's family shocked
Fahmy's fiancee, Arwa Emara, told CNN in December that she had hoped, before Fahmy's arrest, that they would have a "very simple life."
"I was very happy when I first met Mohamed," she said. "I felt that he's the one. And after his arrest, I found myself doing things that I never expected that I'm able to do."
Emara said they can now relax after the court has granted Fahmy bail.
"I am so exhausted and he's exhausted. And now we want to just go out ... enjoy life," Emara said.