The ruling on against Yahia Kallash, head of the country’s press union, and two others comes after a seven-month trial.

An Egyptian court sentenced the head of a journalists’ union and two board members to two years in prison for harbouring colleagues wanted by the law and spreading false news, judicial sources said.

Yahia Kallash, president of the Egyptian Journalists’ Syndicate, Gamal Abdel-Rahim and Khaled Elbalshy were charged in May with sheltering two journalists wanted over protests against the transfer of two Red Sea islands to Saudi Arabia.

Saturday’s decision to sentence the journalists comes as authorities try to quell rising dissent against President Abdel Fattah el-Sisi.

READ MORE: Into the cage – A journalist on trial in Egypt

The court set bail at 10,000 Egyptian pounds ($615), a court official said.

The journalists’ lawyer, Sayyed Abou Zeid, at the time told the Reuters news agency that they denied the charges, which relate to a May 2 police raid on the Egyptian Journalists’ Syndicate to arrest two opposition journalists who had sought shelter from arrest.

Kallash condemned the arrests of Mahmoud El Sakka and Amr Badr, which sparked protests from journalists, and issued a statement two days later demanding the interior minister be sacked.

Amnesty International urged the authorities to drop the charges against the union chiefs.

The Committee to Protect Journalists has listed Egypt among the top jailers of journalists, and one of the most dangerous places to report from.

In 2013, five Al Jazeera staff were imprisoned in the country on charges that rights groups said were trumped up. Though an international campaign secured their freedom, there are more than 70 journalists still in prison in the country.