Canadian Al-Jazeera journalist Mohamed Fahmy was released from an Egyptian prison on Friday, after spending more than a year behind bars on terror-related charges in a case that was denounced as a sham by rights groups and the international community. He was let out pending a retrial.

Fahmy's brother tweeted that he posted $33,000 bail following a court decision on Thursday that allowed him to walk free after more than 400 days in detention. It was not clear if Fahmy's colleague, Al-Jazeera journalist Baher Mohammed, was also being released. A third co-worker, Australian Peter Greste, was freed two weeks ago and deported to his home-country, Australia.

Now that he is out, Fahmy's next court hearing is due Feb. 23 and he has to check in at a police station every day until then.

Thursday's decision indicated the court was moving ahead with a retrial of Fahmy and Mohammed, but several scenarios are possible.

The court could eventually throw out the case, acquit them, convict them but sentence them to time served, or impose more prison time, with the possibility of a pardon from President Abdel-Fattah el-Sissi.

Like Australian Greste, Fahmy, who is Canadian, could also be deported but prospects for Baher, who only has Egyptian citizenship, remain murkier.

Cairo has signaled it wants to resolve the case and end the criticism ahead of a major economic conference next month to drum up international investment. Egypt's staggered parliamentary elections are also due to start in March.

The three journalists, who worked for Al-Jazeera's English-language channel, were arrested in December 2013 and accused of belonging to the Muslim Brotherhood, which was branded a terrorist organization after the military ousted President Mohammed Morsi earlier that year.

Since the ouster, Egypt has been cracking down heavily on Morsi's supporters, and the journalists were accused of being mouthpieces for the Brotherhood and falsifying footage to suggest that Egypt faces civil war. They rejected the charges against them, saying they were simply reporting the news.

They were convicted by a lower court on terrorism-related charges and sentenced to at least seven years in prison. The Court of Cassation, the country's highest appeals court, said in ordering a retrial that their conviction was based on "flawed evidence" and that the trial was marred by violations of the defendants' rights, according to details of its ruling made public this week.

Al-Jazeera called the decision "a small step in the right direction" but said the court should dismiss "this absurd case" and release both journalists unconditionally."

Though el-Sissi had rejected calls from the United States and other Western governments to pardon or commute the sentences, he acknowledged last July that the heavy sentences had a "very negative" impact on Egypt's reputation and that he wished they had never been put on trial.

The journalists and their families say they were caught in the bitter feud between Egypt and Qatar, the Gulf nation that owns Al-Jazeera and a main Brotherhood backer. Egypt's ties with Qatar have since thawed.

Greste was deported under a hastily drawn up law allowing el-Sissi to deport foreigners who are on trial or have been convicted. Fahmy has applied for deportation under the same law, which is confusing and unclear. One defense lawyer, Khaled Abou Bakr, noted that Greste remains listed as a defendant in the case even after his deportation.

Fahmy has said that security officials pushed him into giving up his Egyptian citizenship so he could be sent to Canada, where he also has citizenship.

"I didn't ask to give up my Egyptian citizenship. I was asked to do so," Fahmy said in the courtroom Thursday, wearing a sling on a shoulder that has been injured since before his arrest and only worsened in detention. He said security officials had asked him to do so because the case had become a "nightmare" for Egypt.

Canadian Prime Minister Stephen Harper said Thursday that his government was in touch with officials in Egypt "at all levels, including on my level," and was continuing to press for Fahmy's freedom.

"We do remain optimistic that this case will be resolved," Harper said.

Mohammed and 11 other defendants in the case — mostly students accused of being Brotherhood members — were ordered released without bail.

From Australia, Greste expressed his joy but said it was too soon for unreserved celebrations.

"The trial is ongoing, and nobody has yet been acquitted," Greste said in a statement. "I'm looking forward to the day when the court declares all of us innocent of the charges. Then the party will really begin."