Police on Thursday opened an investigation into allegations of online "blasphemy" after Islamabad High Court asked the government to remove material from social media deemed insulting to Prophet Muhammad.

The step was taken after the IHC asked the Interior Minister Chaudhry Nisar to erase all blasphemous content from social media and track down those who post such content, according to an attorney Tariq Asad.

During Thursday's hearing, Shaukat Aziz Siddiqui, chief justice of the IHC, said he wanted the government to initiate criminal cases against those who commit blasphemy, a sensitive subject in this Islamic nation. Anyone found guilty of insulting Islam can be sentenced to death.

Rights groups often oppose the blasphemy laws, saying the government should review them. The latest controversy surfaced recently after five bloggers mysteriously went missing for several days before returning home. Later, one of them was accused of posting controversial content on social media.

Chaudhry Nisar in a statement on Thursday promised that his government would leave no stone unturned to effectively block blasphemous content on social media.

"We will go to any extent even if we have to go to the extent of permanently blocking all such social media websites if they refuse to cooperate," he said. He added that no content would be allowed on social media that hurts people's religious sentiments.