Demonstrators receive medical treatment in a hospital after police fired on people protesting over a Facebook post by a Hindu who allegedly defamed the Prophet Mohammed, in Barisal on October 20, 2019.   - At least four people were killed and nearly 50 injured on October 20 after police fired on thousands of Bangladeshi Muslims protesting a Facebook post by a Hindu who allegedly defamed the Prophet Mohammed, officials said. (Photo by STR / AFP) / The erroneous mention[s] appearing in the metadata of this photo by MUNIR UZ ZAMAN has been modified in AFP systems in the following manner: [STR] instead of [MUNIR UZ ZAMAN]. Please immediately remove the erroneous mention[s] from all your online services and delete it (them) from your servers. If you have been authorized by AFP to distribute it (them) to third parties, please ensure that the same actions are carried out by them. Failure to promptly comply with these instructions will entail liability on your part for any continued or post notification usage. Therefore we thank you very much for all your attention and prompt action. We are sorry for the inconvenience this notification may cause and remain at your disposal for any further information you may require. (Photo by STR/AFP via Getty Images)
STR/AFP via Getty Images
Demonstrators receive medical treatment in a hospital after police fired on people protesting over a Facebook post by a Hindu who allegedly defamed the Prophet Mohammed, in Barisal on October 20, 2019.   - At least four people were killed and nearly 50 injured on October 20 after police fired on thousands of Bangladeshi Muslims protesting a Facebook post by a Hindu who allegedly defamed the Prophet Mohammed, officials said. (Photo by STR / AFP) / The erroneous mention[s] appearing in the metadata of this photo by MUNIR UZ ZAMAN has been modified in AFP systems in the following manner: [STR] instead of [MUNIR UZ ZAMAN]. Please immediately remove the erroneous mention[s] from all your online services and delete it (them) from your servers. If you have been authorized by AFP to distribute it (them) to third parties, please ensure that the same actions are carried out by them. Failure to promptly comply with these instructions will entail liability on your part for any continued or post notification usage. Therefore we thank you very much for all your attention and prompt action. We are sorry for the inconvenience this notification may cause and remain at your disposal for any further information you may require. (Photo by STR/AFP via Getty Images)
Now playing
01:16
Four killed in riot over offensive Facebook post
WASHINGTON, DC - APRIL 28: Sen. Sheldon Whitehouse, D-R.I., attends the Senate Judiciary Committee confirmation hearing in Dirksen Senate Office Building on April 28, 2021 in Washington, DC. Ketanji Brown Jackson, nominee to be U.S. Circuit Judge for the District of Columbia Circuit, and Candace Jackson-Akiwumi, nominee to be U.S. Circuit Judge for the Seventh Circuit, testified on the first panel. (Photo By Tom Williams-Pool/Getty Images)
Tom Williams/Pool/Getty Images
WASHINGTON, DC - APRIL 28: Sen. Sheldon Whitehouse, D-R.I., attends the Senate Judiciary Committee confirmation hearing in Dirksen Senate Office Building on April 28, 2021 in Washington, DC. Ketanji Brown Jackson, nominee to be U.S. Circuit Judge for the District of Columbia Circuit, and Candace Jackson-Akiwumi, nominee to be U.S. Circuit Judge for the Seventh Circuit, testified on the first panel. (Photo By Tom Williams-Pool/Getty Images)
Now playing
02:28
Sen. Whitehouse faces questions over private beach club membership
CNN
Now playing
02:23
'Ridiculous': Schumer slams Republicans for blocking Democrats' voting rights bill
Manatee County
Now playing
04:59
Two people are dead after Covid-19 outbreak hit a government building
CNN
Now playing
02:16
John King on US economy: Prices are going up big time
ABC
Now playing
01:45
'Bachelorette' opens up about being sexual assault survivor
Getty Images
Now playing
03:59
He inspired an Oscar-nominated film. Now, he could face life in prison
HBO
Now playing
02:15
Pakistan PM faces backlash for claim about sexual violence
A NYPD officer patrols Times Square as rain falls on March 28, 2020 in New York City. - US President Donald Trump said on March 28, 2020 that he's considering a short-term quarantine of New York state, New Jersey, and parts of Connecticut. (Photo by Kena Betancur / AFP) (Photo by KENA BETANCUR/AFP via Getty Images)
Kena Betancur/AFP/Getty Images
A NYPD officer patrols Times Square as rain falls on March 28, 2020 in New York City. - US President Donald Trump said on March 28, 2020 that he's considering a short-term quarantine of New York state, New Jersey, and parts of Connecticut. (Photo by Kena Betancur / AFP) (Photo by KENA BETANCUR/AFP via Getty Images)
Now playing
06:36
CNN rides along with NYPD as crime rates spike
US President Donald Trump listens during a meeting with Arkansas Governor Asa Hutchinson (R) and Kansas Governor Laura Kelly (L), on May 20, 2020, in the Cabinet Room of the White House in Washington, DC. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
BRENDAN SMIALOWSKI/AFP/AFP via Getty Images
US President Donald Trump listens during a meeting with Arkansas Governor Asa Hutchinson (R) and Kansas Governor Laura Kelly (L), on May 20, 2020, in the Cabinet Room of the White House in Washington, DC. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
Now playing
04:48
Trump wanted to send infected Americans to Guantanamo Bay, book says
Now playing
03:36
They stood up to Trump's lies and now are losing their jobs
CNN
Now playing
03:14
This family's lives will be changed by the child tax credit
WDJT
Now playing
01:35
Sen. Ron Johnson gets heckled at Juneteenth event
CNN
Now playing
02:39
NY candidate says he's joining forces with his opponent. Here's why
FLINT, MI - OCTOBER 31: Former U.S. President Barack Obama speaks during a drive-in campaign rally for Democratic presidential nominee Joe Biden at Northwestern High School on October 31, 2020 in Flint, Michigan. Biden is campaigning with former President Obama on Saturday in Michigan, a battleground state that President Donald Trump narrowly won in 2016. (Photo by Drew Angerer/Getty Images)
Drew Angerer/Getty Images North America/Getty Images
FLINT, MI - OCTOBER 31: Former U.S. President Barack Obama speaks during a drive-in campaign rally for Democratic presidential nominee Joe Biden at Northwestern High School on October 31, 2020 in Flint, Michigan. Biden is campaigning with former President Obama on Saturday in Michigan, a battleground state that President Donald Trump narrowly won in 2016. (Photo by Drew Angerer/Getty Images)
Now playing
00:54
Obama slams GOP's opposition to voting reform
Getty Images
Now playing
02:47
Enten: Straw poll of GOP activists rates DeSantis over Trump
Iran's new President-elect Ebrahim Raisi speaks during a press conference in Tehran, Iran, Monday, June 21, 2021. (AP Photo/Vahid Salemi)
Vahid Salemi/AP
Iran's new President-elect Ebrahim Raisi speaks during a press conference in Tehran, Iran, Monday, June 21, 2021. (AP Photo/Vahid Salemi)
Now playing
02:28
CNN asked Iran's President-Elect about nuclear deal. Hear his reply
CNN —  

Four people were killed Sunday when Bangladesh police fired on a crowd after clashes erupted over a Facebook post that angered Muslims.

Thousands of people took to the streets in the town of Borhanuddin, in Bangladesh’s southern Bhola district, to protest the post that allegedly criticized the Prophet Muhammad.

“We had to fire, we had no options,” said AKM Ehsanullah, a senior police official in the Barisal Range, Bangladesh.

The offending post was published Friday from the account of a 25-year-old Hindu man in the area, said Shafin Mohammed, additional superintendent of police in Bhola.

The man had told police his Facebook account was hacked.

As the post started to draw more attention online, senior police and district officials met with religious leaders of the region Saturday to try and calm the situation and reassure them that action was being taken.

But an angry crowd gathered in a field near the police station on Sunday demanding justice.

Police said they had no plans to apply deadly force as the protest was calm at first, but some in the crowd became violent and started to throw stones and bricks at officers.

“There was some construction work going on nearby, so there were a lot of bricks. They were throwing the bricks at us. We locked ourselves in a room (in a nearby compound),” Ehsanullah said.

Ehsanullah said police initially fired pellet guns in a bid to disperse the crowd after up to 100 people tried to break into the room where the officers were taking refuge.

“The door was about to be broken. The window grill was almost broken. We had put a mattress against the window,” he said. “We shot pellet guns – which are not lethal but we could not disperse them.”

A demonstrator receives medical treatment in a hospital in Bangladesh.
STR/AFP/AFP via Getty Images
A demonstrator receives medical treatment in a hospital in Bangladesh.

The officers then requested to use live rounds. “Our heads would have been crushed by bricks… If they could get inside, we would all have died,” Ehsanullah said. Dozens were injured.

The Hindu man at the center of the incident filed a police complaint denying he posted the comment, saying his Facebook account was hacked and he was being blackmailed by the hacker.

Police said the man claimed the hacker had demanded money and threatened to publish damaging posts if he did not receive the funds. Ehsanullah said three people had been arrested over the alleged hacking incident.

An officially secular but Muslim-majority nation, Bangladesh has a history of communal tension that often spills over into violence.

Between 2013 and 2016, there was a spate of targeted killings – blamed on Islamist radicals – that claimed the lives of secularist writers and bloggers, religious minorities and gay activists, and prompted a crackdown on extremism from Bangladesh authorities.