CAIRO (AP) — Human Rights Watch on Monday called on Egypt to drop prison sentences against four Coptic Christian teenagers convicted of blasphemy, an appeal made one day after the justice minister was sacked for saying he would imprison the Prophet Muhammad if he committed a crime, remarks widely seen as blasphemous.

The teenagers' Feb. 25 conviction was based on a video in which they intended to mock the extremist Islamic State group after its Libyan affiliate beheaded a group of Egyptian Christians last year.

The 30-second clip showed the students pretending to pray, with one kneeling on the floor while reciting Quranic verses and two others standing behind him and laughing. One ran his hand on another one's throat, mimicking a beheading. The video was filmed on a mobile phone by a teacher, who is also a Christian. He was sentenced to three years in prison for insulting Islam in a separate trial.

Rights groups say a flurry of recent blasphemy cases in Egypt is part of a culture of intolerance within the judicial system at a time when President Abdel-Fattah el-Sissi is seeking to position himself as an advocate for religious reform.

Three of the boys, who were tried in absentia, were sentenced to five years in prison. A fourth was referred to a juvenile facility.

"These children shouldn't face prison for expressing themselves, even with an immature joke," said Nadim Houry, HRW's deputy Middle East director. "Mocking ISIS, or any religious group, with a childish joke is not a crime. Instead of giving in to retrograde views on blasphemy, Egyptian authorities should protect freedom of expression," he said, using one of several acronyms for the Islamic State group.

HRW also called on Egyptian authorities to revoke the penal code used to prosecute blasphemy.

Justice Minister Ahmed el-Zind's comments about the prophet were made in a TV interview aired last week. They were widely condemned on social media networks and prompted al-Azhar, the powerful, Cairo-based seat of Islamic learning, to issue a statement urging anyone speaking in the media to leave Islam's 7th century prophet out of their comments as a show of respect.

El-Zind said his comment was a slip of the tongue and has repeatedly apologized in subsequent media appearances.

Some of the minister's past comments have been controversial. He has called for punishing the parents of convicted terrorists, accusing them of negligence in bringing up their children. He has also said 10,000 members of the outlawed Muslim Brotherhood group should be executed for every policeman or soldier killed by Islamic militants.

His predecessor, Mahfouz Saber, was forced to resign less than a year ago when he said in a TV interview that the sons of cleaners should not be allowed to be judges.

El-Zind was a vehement supporter of el-Sissi's 2013 military overthrow of President Mohammed Morsi, Egypt's first freely elected and first Islamist leader. El-Zind had galvanized the opposition of judges to efforts by Morsi and his Muslim Brotherhood group to dominate the judiciary during his chaotic yearlong rule.

El-Zind served as justice minister at a time when Egypt's judiciary faced intense criticism from human rights groups over the jailing of activists and journalists, and over mass death sentences handed down to Brotherhood members. The government insists the judiciary is independent and non-political.

"It is a sad day for justice in Egypt," popular pro-el-Sissi TV host Ahmed Mussa said Sunday night.

"It is a big mistake on the part of the prime minister and the president," he said. "Regrettably, a bad end awaits anyone who works for the interest of the nation. It's much better to stand aside and shut up."