An Egyptian judge ordered the release Thursday of two Al Jazeera English journalists who were jailed for more than a year on charges­ of aiding the Muslim Brotherhood.

The journalists and 20 other defendants are facing a retrial after an appeals court’s dismissal of their initial convictions in June. The judge set bail for Canadian journalist Mohamed Fahmy at more than $33,000, and the remaining defendants were set free without bond.

Their release comes less than two weeks after their Al Jazeera colleague and co-defendant Peter Greste was deported to his native Australia under a new decree that allows the president to expel foreign nationals convicted of crimes in Egypt.

Greste, imprisoned for 400 days, was the focus of an international campaign for his release.

“This is a huge step forward,” Greste posted on Twitter. “Not time to declare it over, but at least you get to go home!”

An Egyptian court ordered the release of two Al-Jazeera journalists, including Mohamed Fahmy, center, pending their retrial for allegedly supporting the banned Muslim Brotherhood. (Mohamed El-Shahed/AFP/Getty Images)

The high-profile case against the Al Jazeera journalists has drawn worldwide criticism from rights groups that say the trial was a sham.

The Muslim Brotherhood-led government was toppled in 2013, and authorities have staged a series of crackdowns and trials against the group. Egypt’s government has claimed Qatar-based Al Jazeera acted as a mouthpiece of the Muslim Brotherhood, which had been backed by the Persian Gulf state.

In June, a criminal court judge sentenced Greste and Fahmy to seven years in prison and Al Jazeera producer Baher Mohamed to 10 years.

But earlier this week, the appeals court that overturned the original convictions issued a statement saying that prosecutors did not present adequate evidence against the defendants.

The Court of Cassation, the highest appeals court in Egypt, said prosecutors failed to link the Al Jazeera journalists with an act of violent terrorism. The opinion raised hopes among the defendants and their families that the case would be thrown out.

Fahmy and Mohamed, an Egyptian citizen, are still required to attend the sessions of their retrial, legal experts say. The judge presiding over the retrial, Hassan Fareed, has handed out harsh sentences to alleged members of the Muslim Brotherhood.

In December, Fahmy renounced his Egyptian citizenship in what he told the court was a deal struck with Egyptian security services­ to deport him to Canada. Egyptian President Abdel Fattah al-Sissi has not signed an executive order to release Fahmy to Canadian authorities.

“Bail is a small step in the right direction, and allows Baher and Mohamed to spend time with their families,” Al Jazeera spokesman Osama Saeed said in a statement. “The focus though is still on the court reaching the correct verdict at the next hearing by dismissing this absurd case.”

Heba Habib contributed to this report.