MANSEHRA, Pakistan (AP) — Pakistani police arrested a teacher at a Quranic school and his two friends on charges of gang raping a college student in the country's northwest, alleging he filmed the attack and may have blackmailed other victims, authorities said Wednesday.

The case against Qari Naseer, 27, in the city of Mansehra marks a rare rape arrest in Pakistan, where prosecutions are few and victims are often stigmatized. In this case, however, crowds gathered outside of a court where Naseer and his friends faced a judge for the first time Wednesday.

The crowd pelted them with bottles of black ink, stones and tomatoes, demanding they be hung in public for the crime, Mansehra's police chief Khurram Rasheed said. Blackening someone is an insult in Pakistani culture.

"I am feeling shame for doing this act," Naseer told an Associated Press journalist before the hearing. Lawyers for Naseer and the other two men could not be immediately reached for comment.

The attack took place Monday in Mansehra, home to several religious schools, police officer Zulfiqar Jadon said. Jadon said Naseer, who had taught the Quran for several years, lured the victim and her friend on the pretext of dropping them off at home. Naseer and his friends then raped the 20-year-old woman in the moving car, Jardon said.

Rasheed said Naseer told investigators he had installed a hidden camera in his car to record his attacks. The police chief said investigators were looking into his claims, checking Naseer's car and claims he blackmailed other victims.

Naseer and the two men can be held for another four days as police investigate after Wednesday's hearing.

The case against Naseer is unusual as rape cases are rarely prosecuted in Pakistan, especially when they involve religious leaders or those who teach the Quran in the Muslim nation. In March, a women set herself on fire outside of a police station in Pakistan after reporting that men tried to rape her and authorities said there wasn't enough evidence to make arrests.