The clashes in the southern district of Bhola, 195 km (120 miles) from the capital Dhaka, broke out when angry crowds protested against a Facebook post in which a Hindu reportedly made derogatory remarks about Prophet Mohammad.
Police said the Facebook had actually been hacked and all the hackers had been detained.
"We fired blank shots in self-defence when some people started throwing stones at our officers forcing us to take shelter in a building," said Sarkar Mohammad Kaisar, Superintendent of Police in Bhola.
Four people were killed and a policeman suffered bullet wounds during the clash, he said. Border guards and additional police have been sent to Bhola.
Bangladesh is home to 168 million people, 90% of which are Muslim. Hindu minorities have seen persecution in the country over past years.
anuary and June 2017 in Bangladesh.
The Bangladesh Hindu Buddhist Christian Unity Council reported that 25 Hindu homes were destroyed, 51 Hindus wounded and 81 Hindu temples, monasteries and statues destroyed between J