Police officers unlawfully interfered with a man’s right to freedom of expression by turning up at his place of work to speak to him about allegedly “transphobic” tweets, the high court has ruled.

Harry Miller, a former police officer who founded the campaign group Fair Cop, said the actions of Humberside police had a “substantial chilling effect” on his right to free speech.

Miller, 54, from Lincolnshire, said an officer told him he had not committed a crime, but that his tweeting was being recorded as a “hate incident”.

In a strongly-worded judgement, Mr Justice Julian Knowles said the effect of police turning up at Miller’s place of work “because of his political opinions must not be underestimated”.

He said: “In this country we have never had a Cheka, a Gestapo or a Stasi. We have never lived in an Orwellian society,” he said.

But trans rights activists reacted with disappointment to parts of the judge’s ruling. Helen Belcher, co-founder of Trans Media Watch, said trans people would fear “open season” on them as a result. She added: “I think it will reinforce an opinion that courts don’t understand trans lives and aren’t there to protect trans people.”

Knowles rejected a wider challenge to the lawfulness of the College of Police guidance, ruling that it “serves legitimate purposes and is not disproportionate”. The guidance defines a transgender hate incident as “any non-crime incident which is perceived, by the victim or any other person, to be motivated by a hostility or prejudice against a person who is transgender or perceived to be transgender”.

Speaking outside the Royal Courts of Justice after the ruling, Miller called it “a watershed moment for liberty”.

Miller posted a number of tweets between November 2018 and January 2019 which he said formed part of the debate about proposed changes to the Gender Recognition Act 2004.

The tweets included: “I was assigned Mammal at Birth, but my orientation is Fish. Don’t mis species me.” Miller also tweeted: “Transwomen are women. Anyone know where this new biological classification was first proposed and adopted?”. He later wrote that the statement was “bollocks”.

Miller also retweeted a poem by someone else on Twitter which appeared to be directed to a trans woman and used the term “stupid man”, making a derisive reference to a trans woman’s genitalia.

On the same day, Stephanie Hayden, a trans woman, has won her case against a woman who called her a “pig in a wig” and made multiple Twitter accounts to send her anti-trans messages. The court found Kate Scottow guilty of persistently making use of a public communications network to cause annoyance/inconvenience and anxiety at St Albans magistrates court.

In the Miller case, the judge ruled that there was no evidence Miller’s tweets “were ‘designed’ to cause deep offence”, adding that: “The tweets were not directed at the transgender community. They were primarily directed at the claimant’s Twitter followers.” The tweets were lawful and there was not “the slightest risk” that he would commit a criminal offence by continuing to tweet, he ruled.

Knowles stressed “the vital importance of free speech”, saying it included “not only the inoffensive, but the irritating, the contentious, the eccentric, the heretical, the unwelcome and the provocative”.

In his judgment, Knowles said: “I conclude that the police’s actions led him, reasonably, to believe that he was being warned not to exercise his right to freedom of expression about transgender issues on pain of potential criminal prosecution.”

The judge also emphasised he was not “concerned with the merits of the transgender debate”, adding “[t]he issues are obviously complex”.

Deputy chief constable Bernie O’Reilly, executive director at the College of Policing, said he was pleased the court had recognised the guidance on recording non-crime hate incidents was “both lawful and extremely important in protecting people”.

He added: “Our guidance is about protecting people because of who they are and we know this is an area where people may be reluctant to report things to us.”

Cara English from the group Gendered Intelligence said trans people were facing “diabolical rhetoric”. She welcomed the conviction of Scorrow which she said would “help end harassment against trans people”.

Referring to the Miller case, she called for measured language. “If those users antagonistic to trans people freely living their lives could dial down the needlessly inciting language – particularly on Twitter – that may help to deescalate the unfortunate situation in which we find ourselves,” she said.

Kirrin Medcalf, head of trans inclusion at Stonewall, said Hate Crime Operational Guidance was “vital” because one in eight trans people had been assaulted at work. “Police must be able to record hate incidents so it’s important that this ruling re-affirmed that the guidance is lawful,” he said. “As a society, we must find ways to better support the two in five trans people who have faced a hate crime or incident in the last year.”

The judge granted Miller permission to appeal against his ruling on the lawfulness of the College of Police’s guidance at the supreme court.