Police say a boy has been killed in a shootout between police and an angry mob after it attacked a police station, demanding they should be allowed to execute a minority Hindu being held over blasphemy charges.

Local police official Atta Ullah said the clash took place in the town of Hub in the southwestern Baluchistan province after police arrested Parkash Kumar, 35, on reports that he shared content allegedly blasphemous against Islam's Prophet Muhammad on WhatsApp.

He said officers were still questioning the man when the mob stormed the police station, sparking a shootout in which a young boy was killed.

Ullah said authorities are still trying to restore order with help from elders.

Blasphemy against Islam and its prophet is punishable by death under Pakistani law.