An Egyptian court on Saturday sentenced three Al-Jazeera English journalists to three years in prison, the last 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.

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.

Fahmy was asked to give up his Egyptian nationality by Egyptian officials in order to qualify for deportation. It's not clear why he was deported, though Fahmy said he thinks Canada could have pressed Cairo harder on the matter.

Angered by Al-Jazeera handling of the case, Fahmy has filed a lawsuit in Canada seeking $100 million from the broadcaster, saying that it put the story ahead of employee safety and used its Arabic-language channels to advocate for the Brotherhood. Al-Jazeera has said Fahmy should seek compensation from Egypt.