Updated

The government of the United Kingdom warned its citizens this week to be careful of posting material deemed offensive — threatening imprisonment for those who incite "hatred."

The Crown Prosecution Service posted a warning to social media platform X on Wednesday warning citizens to "Think before you post!" amid ongoing riots that have fractured the country's polity.

"Content that incites violence or hatred isn't just harmful - it can be illegal," the government agency wrote. "The CPS takes online violence seriously and will prosecute when the legal test is met. Remind those close to you to share responsibly or face the consequences."

UK GOVERNMENT 'SCOURING SOCIAL MEDIA' TO ARREST PEOPLE FOR SHARING 'HARMFUL' RIOT FOOTAGE REGARDLESS OF INTENT

uk riots united kingdom

Police officers face protesters during an anti-immigration demonstration outside the Holiday Inn Express in Rotherham, England. (Danny Lawson/PA via AP)

The CPS added, "The British government is cracking down on people who share social media posts about the U.K. riots that it judges are 'likely to start racial hatred.'"

The post was then amplified by the GOV.UK website's official account.

Riots have broken out across the U.K. in recent days over a mass stabbing at a Taylor Swift-themed dance event that left three girls dead and others wounded. 

UK NEWS OUTLET CUTS LIVE FEED AFTER REPORTER IS SURROUNDED BY MASKED MEN SHOUTING 'FREE PALESTINE'

Britain's Prime Minister Keir Starmer riots United Kingdom

Britain's Prime Minister Keir Starmer (C) listens to Commander Ben Russell (L) next to Metropolitan Police Commissioner Mark Rowley (back) during a visit to Lambeth Police Headquarters in London on August 9, 2024. Starmer said that authorities "have to stay on high alert going into this weekend", amid fears of further far-right riots in English towns and cities.  (TOBY MELVILLE/POOL/AFP via Getty Images)

The murders, allegedly committed by a now 18-year-old British citizen born to Rwandan parents, sparked a series of violent protests that tapped into broader concerns about the scale of immigration in the U.K.

Footage of the violent clashes involving anti-immigration protesters and the groups of counter-protesters, some of whom have been seen waving Palestinian flags, has gone viral on social media, and the government is warning that sharing such content may have serious consequences.

CLICK TO GET THE FOX NEWS APP

Plymouth-Riot-3

Counterprotesters gather at Guildhall square to face off right-wing protesters after they announced a protest in Plymouth, United Kingdom. (Photo by Behlul Cetinkaya/Anadolu via Getty Images)

The director of public prosecutions of England and Wales, Stephen Parkinson, previously warned against "publishing or distributing material which is insulting or abusive which is intended to or likely to start racial hatred. So, if you retweet that, then you’re republishing that and then potentially you're committing that offense [incitement to racial hatred]."

He added further, "We do have dedicated police officers who are scouring social media. Their job is to look for this material, and then follow up with identification, arrests, and so forth."

Fox News Digital's Alexander Hall contributed to this report.