Mohamed Fahmy
Al Jazeera journalist Mohamed Fahmy raises an Egyptian national flag while talking to the judge during his retrial at a court in Cairo Feb. 12, 2015. Reuters/Asmaa Waguih

Al Jazeera journalists Mohamed Fahmy and Baher Mohammed, who were imprisoned for more than 400 days, have been released from an Egyptian prison, their families reportedly said Friday. The release comes after a court on Thursday ordered their bail but did not dismiss the case against them.

Canadian journalist Fahmy, 40, was released on a $33,000 bail while Mohammed, an Egyptian citizen, did not have to pay for his release but was reportedly ordered not to leave the country before the retrial. The court has ordered a retrial hearing on Feb. 23 and Fahmy reportedly must give his attendance everyday at a local police station until then. While ordering a retrial, the court said that the earlier trial was based on "flawed evidence" and was hindered by violations of the defendants' rights, according to details of the ruling, The Associated Press (AP) reported.

The two were arrested along with Australian Al Jazeera correspondent Peter Greste in December 2013 while covering the aftermath of the fall of the Muslim Brotherhood government of former President Mohammed Morsi. They were tried on charges of producing fake news and aiding Morsi’s Muslim Brotherhood party, which has since been declared a terrorist group by the Egyptian government.

Fahmy reportedly said that security officials had forced him into giving up his Egyptian citizenship so he could be sent to Canada as the case had become a "nightmare" for Egypt. "I didn't ask to give up my Egyptian citizenship. I was asked to do so," he said in the courtroom, according to AP.

Greste, who was tried with his two colleagues, was released on Feb. 1 and was deported home to Australia. Greste had vowed he will not "give up" until his colleagues were released.

Fahmy’s family had reportedly accused Canada of not pressing the Egyptian government hard enough for his release as the Australians had done for Greste.

“I don’t understand how a defendant in the same case with the same evidence … is on the beach in Australia,” Fahmy personally asked the judge during Thursday's hearing, referring to Greste's release.