CAIRO — An Egyptian court on Saturday sentenced three Al-Jazeera English journalists to three years in prison, the latest twist in a long-running trial criticized worldwide by press freedom advocates and human rights activists.

The case against Canadian national Mohammed Fahmy, Australian journalist Peter Greste and Egyptian producer Baher Mohammed embroiled their journalism into the wider conflict between Egypt and Qatar following the 2013 military ouster of Islamist President Mohammed Morsi.

It wasn't immediately clear how the sentence would affect the three men. Greste, deported in February, spoke to Al-Jazeera from Sydney and criticized the verdict.

Shocked. Outraged. Angry. Upset. None of them convey how I feel right now. 3 yr sentences for @bahrooz, @MFFahmy11 and me is so wrong. — Peter Greste (@PeterGreste) August 29, 2015

Mostefa Souag, Al-Jazeera English acting director-general, also criticized the verdict, saying it "'defies logic and common sense."

"The whole case has been heavily politicized and has not been conducted in a free and fair manner," Souag said in a statement. "There is no evidence proving that our colleagues in any way fabricated news or aided and abetted terrorist organizations and at no point during the long drawn out retrial did any of the unfounded allegations stand up to scrutiny."

The case began in December 2013, when Egyptian security forces raided the upscale hotel suite used by Al-Jazeera at the time to report from Egypt. Authorities arrested Fahmy, Greste and Mohammed, later charging them with allegedly being part of Morsi's Muslim Brotherhood, which authorities have declared a terrorist organization, and airing falsified footage intended to damage national security.

Since Morsi's ouster, Egypt has cracked down heavily on his supporters, and the journalists were accused of being mouthpieces for the Brotherhood. Al-Jazeera and the journalists have denied the allegations, saying they were simply reporting the news. However, Doha has been a strong supporter of the Brotherhood and other Islamist groups in the greater Mideast.

At trial, prosecutors used news clips about an animal hospital with donkeys and horses, and another about Christian life in Egypt, as evidence they broke the law. Defense lawyers — and even the judge — dismissed the videos as irrelevant. Nonetheless, the three men were convicted on June 23, 2014, with Greste and Fahmy sentenced to seven years in prison and Mohammed to 10 years.

The verdict brought a landslide of international condemnation and calls for newly elected President Abdel Fattah el-Sissi, who as military chief led the overthrow of Morsi, to intervene. Egypt's Court of Cassation, the country's highest appeals court, later ordered their retrial, saying the initial proceedings were marred by violations of the defendants' rights.

Egypt deported Greste in February, though he remained charged in the case. Fahmy and Mohammed were later released on bail.