A video shared on social media of a cardboard model of Grenfell Tower being set alight by a laughing crowd has prompted outrage, condemnation and some difficult questions.

Prime Minister Theresa May called the effigy, complete with paper figures at the windows, "utterly unacceptable".

And Rukayet Mamadu, a survivor of the 2017 fire in which 72 people died, said it was "chilling".

As five men are arrested on suspicion of a public order offence, the BBC's legal correspondent Clive Coleman delves into the thorny matter of when causing offence becomes a crime.

Can I be offensive in my own home?

Basically, yes.

Our public order law aims to ensure that individual rights to freedom of speech and freedom of assembly are balanced against the rights of others to go about their daily lives without being harassed, alarmed or distressed.

The Public Order Act 1986 says: An offence under this section may be committed in a public or a private place, except that no offence is committed where the words or behaviour are used, or the writing, sign or other visible representation is displayed, by a person inside a dwelling and the person who is harassed, alarmed or distressed is also inside that or another dwelling.

It is, after all, called the Public Order Act, not the Private Order Act.

The act also makes clear that it is a defence to a charge of causing intentional harassment, alarm or distress if a person can prove:

(a) that he was inside a dwelling and had no reason to believe that the words or behaviour used, or the writing, sign or other visible representation displayed, would be heard or seen by a person outside that or any other dwelling, or

(b) that his conduct was reasonable.

However, if you make offensive comments in your home and they are recorded and posted online, it might be possible that you could be prosecuted.

Again the specific words or behaviour and your intention when posting the material would be key.

Can I be offensive in public if making a joke?

Yes. However, the key words in the offence are "with intent".

So the critical question would be whether you told the offensive joke with the specific intent of causing anyone present harassment, alarm or distress - and that they did indeed suffer one of those things.

A joke that was simply offensive and in bad taste would not be sufficient for a prosecution.

Prosecutors would have to prove that the joke-teller specifically intended someone in the audience to suffer harassment, alarm or distress.

Prosecutors would be very aware of the general and powerful right to freedom of expression under article 10 of the European Convention on Human Rights.

There have been few, if any, prosecutions of people telling offensive jokes in public.

What if I share my video or message on social media?

Image copyright Getty Images

Sharing a video on social media could possibly amount to a public order offence.

Again the key words would be "with intent" - what was the intent behind the posting?

If the prosecution can prove that it was done to cause a person harassment, alarm or distress, and that someone has suffered one of those things, it is possible that posting could amount to a public order offence under Section 4a.

Is there a difference between sharing the message on a closed group like WhatsApp and more widely on social media like Twitter?

The size of the potential audience doesn't necessarily matter.

Posting on a closed WhatsApp group of generally likeminded people would considerably reduce the risk of a prosecution.

However, if the person posting intended to harass, alarm or distress one of the group, an offence might be made out.

Again it will not be enough if a person was simply offended by the post.

There is also a specific offence under the Communications Act 2003 of sending on a public electronic communications network a message or other matter that is grossly offensive or of an indecent, obscene or menacing character; or causes any such message to be so sent.

This can and has been used to prosecute those posting grossly offensive messages online and on social media.