An Egyptian court has sentenced a 21-year-old student to three years in jail for insulting Islam after police discovered he declared his atheism on Facebook. The young man had been harassed for his atheist views and had his own father testify against him.

Karim Ashraf Mohammed Al-Banna was tried in Idku city in northern Egypt. The student was arrested last November when he came to police to file a harassment complaint. It was revealed that Al-Banna was harassed in public for announcing he was an atheist online.



The student was kept in custody till the trial, which determined he made Facebook posts “insulting” to Islam.



“He was handed down a three-year prison sentence, and if he pays a bail of 1,000 Egyptian pounds ($140) the sentence can be suspended until a verdict is issued by an appeals court,” the student’s lawyer, Ahmed Abdel Nabi, said, adding that they plan to file an appeal in the beginning of March.



According to the lawyer, Al-Banna’s own father testified against him saying he “was embracing extremist ideas against Islam,” the Daily Mail reports.

READ MORE: ‘First gay wedding’ video sends 8 Egyptians to jail for 3 years

This case is not the first trial concerning atheism in Egypt. In 2013 student Sherif Gaber Abdel Azim was handed 15-day detention being charged for contempt of religion as he created a group on Facebook called “atheists.”



In 2012, blogger Alber Saber was taken into custody after he was accused of posting the incendiary film Innocence of the Muslims on his Facebook account. He was charged with defamation of Islam and Christianity, insulting the divine and satirizing religious rituals and sanctities and sentenced to three years in prison but he managed to leave the country in 2013 when he was released pending an appeal.



Last August, the Ministries of Religious Endowment and Culture signed a joint protocol, according to which they are to confront both religious extremism and atheism and to spread Islam. The actual Egyptian constitution states that Islam is the religion of the State and the principles of Islamic Sharia are the main source of legislation.



The special department of the Egyptian government for religious affairs, Dar Al-Ifta, reported last December there are 866 atheists in the country which is about 0.001 percent of the 87-million population.