Picture this if you can: a man is contacted by the police. He is informed that he has done nothing criminal but his social media posts have offended someone.

As a result, the police have recorded his social media comments as a non-crime hate incident that may show up on his criminal record checks and affect his future employment. Whilst this sounds like something out of Communist Russia, this really happened in Britain only three years ago.

Just before Christmas, in an historic judgment for those of us who believe in freedom of speech, the Court of Appeal ruled that the College of Policing’s guidance requiring non-crime hate incidents to be officially recorded by the police was an unlawful incursion to our freedom of expression.

As the trial judge noted, the man’s tweets were “for the most part, either opaque, profane or unsophisticated", but this should not justify silencing his right to contribute to contentious political debates.

In his case, the debate had been about the relative importance of biological sex and self-declared gender identity in relation to single-sex spaces and sport. For some, this is an area of great contention with competing perspectives, but whatever our views may be, we must have the right to freely express them.

So what got us into this mess in the first place? The genesis of police recording of non-crime hate incidents was well intentioned and follows on from the report into Stephen Lawrence’s murder in 1993, which found institutional racism in the Metropolitan Police.

As a result of the Lawrence Report, recommendations were made to define a racist incident as any “perceived to be racist by the victim or any other person” and that non-crime incidents should be reported, recorded and investigated with the same commitment as real crimes.

The aim was to help the Metropolitan Police overcome institutional racism and to build confidence within ethnic minority communities. However, in due course, College of Policing guidance has expanded to cover a number of other “protected characteristics” including gender.

Some police forces (not ours in Suffolk) have developed a track record for misinterpreting the law. For example, last February, Merseyside Police claimed that “being offensive is an offence”.

In a world where the police do not have the resources to investigate non-crime incidents, partly because of the volume of reports generated by social media, the College of Policing tells police officers to record as hate incidents all those perceived by the person reporting them to be motivated by hostility, including unfriendliness or dislike.

The recent Court of Appeal judgment has implications for freedom of speech which go way beyond policing: it rightly observes “how quickly some involved in the transgender debate are prepared to accuse others with whom they disagree of showing hatred, or as being transphobic when they are not”.

We see this intolerance of different views everywhere: from Harry Potter actors condemning JK Rowling for her “hateful” views, to broadcasters or university students saying speakers should be “cancelled” for saying biological sex is immutable.

There is no democracy without freedom of expression. In a world where it is possible to take offence at almost anything and everything, the police acting unlawfully to shut down legitimate political debate in 21st-century Britain should remind us that the most basic human rights should never be taken for granted.

- Dr Dan Poulter is the Conservative MP for Central Suffolk and North Ipswich