The police response to an ex-officer's allegedly transphobic tweets was unlawful, the High Court has ruled.
Harry Miller was visited by Humberside Police at work in January last year after a complaint about his tweets.
He was told he had not committed a crime, but it would be recorded as a non-crime "hate incident".
The court found the force's actions were a "disproportionate interference" with his right to freedom of expression.
Officers visited Mr Miller's workplace and then spoke with him on the phone, and he was left with the impression "that he might be prosecuted if he continued to tweet", according to a judge.
Speaking after the ruling, Mr Miller, from Lincolnshire, said: "This is a watershed moment for liberty - the police were wrong to visit my workplace, wrong to 'check my thinking'."
His solicitor Paul Conrathe added: "It is a strong warning to local police forces not to interfere with people's free speech rights on matters of significant controversy."
Mr Justice Julian Knowles said the effect of police turning up at Mr Miller's place of work "because of his political opinions must not be underestimated".
He added: "To do so would be to undervalue a cardinal democratic freedom.
"In this country we have never had a Cheka, a Gestapo or a Stasi. We have never lived in an Orwellian society."
Responding to the ruling, Helen Belcher, who co-founded Trans Media Watch, said: "I think trans people will be worried it could become open season on us because the court didn't really define what the threshold for acceptable speech was.
"I think it will reinforce an opinion that courts don't understand trans lives and aren't there to protect trans people."
Mr Miller, 54, also launched a wider challenge against the lawfulness of College of Policing guidelines on hate crimes, which was rejected.
Mr Justice Knowles ruled they "serve legitimate purposes and [are] not disproportionate".
The guidelines define a 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".
Mr Miller posted a number of tweets between November 2018 and January 2019 about transgender issues as part of the debate about reforming the Gender Recognition Act 2004.
In one tweet Mr Miller wrote: "I was assigned mammal at birth, but my orientation is fish. Don't mis-species me."
This tweet was among several others which were reported to Humberside Police as being allegedly transphobic.
Mr Miller's barrister, Ian Wise QC, argued the force's response had sought to "dissuade him from expressing himself on such issues in the future" and had a "substantial chilling effect" on his right to free speech.
Mr Justice Knowles said Mr Miller "strongly denies being prejudiced against transgender people" and had regarded himself as a participant in a public debate.
He said only one person, known in court as Mrs B, had complained about the tweets and they had been recorded as a hate incident "without any critical scrutiny...or any assessment of whether what she was saying was accurate".
The judge said: "The claimants' tweets were lawful and there was not the slightest risk that he would commit a criminal offence by continuing to tweet.
"I find the combination of the police visiting the claimant's place of work, and their subsequent statements in relation to the possibility of prosecution, were a disproportionate interference with the claimant's right to freedom of expression because of their potential chilling effect."
By Clive Coleman, BBC's Legal Affairs Correspondent
The police guidance on non-crime hate incidents was developed after the murder of the black teenager Stephen Lawrence in a racist attack in 1993.
Its aim is to deal with hate incidents before they escalate into serious hate crimes.
Each year more than 25,000 such non-crime hate incidents are logged by UK police. The bulk relate to race and disability.
Today's ruling will make the job of policing such incidents increasingly challenging for the police. Where does a comment or statement leave the boundaries of free speech and become a hate incident short of a crime?
That can be as much a linguistic and ethical judgment as a policing decision.
Humberside Police said it accepted the court's decision, adding: "The mere recording of the incident by Humberside Police as a hate incident has been ruled as not unlawful and in accordance with the College of Policing (CoP) guidance.
"Our actions in handling the incident were carried out in good faith but we note the comments of the judge and we will take learning from this incident moving forward."
Deputy Chief Constable Bernie O'Reilly, of the College of Policing, said: "Policing's position is clear - we want everyone to feel able to express opinions as passionately as they wish without breaking the law."
He added: "Hate incidents can be a precursor to these types of crimes and without recording them the police will begin to lose sight of what is happening in their communities - and potentially lose their confidence."
He said the advice to forces was currently being revised.
Trans Media Watch said: "Whilst we appreciate that the police must take care not to overreact to incidents, we feel that it is vital to a democratic society that everyone enjoys the same level of police protection.
"We are sure that it was not the judge's intention to suggest that trans people deserve less protection at present than they did in 2016, before the present media interest in the gender recognition process began.
"We hope that his words today will not have the result of putting other minority groups which may become the subject of intense media attention in a position where hatred displayed towards them is less likely to be treated seriously."
Mr Miller has appealed against the ruling about the College of Policing guidance and permission has been granted for the case to go straight to the Supreme Court.
Transgender hate crimes, which are different and more serious than non-crime hate incidents, are rising in England and Wales, according to police records.
In the 12 months to 31 March 2019, the police recorded 2,333 transgender hate crime incidents. That was 37% higher than the previous year. In percentage terms, transgender hate crimes saw the biggest increase compared with other hate crime categories (race, religion, sexual orientation and disability).
The Home Office says that some of this rise could be down to improvements in the way the police identify and record transgender hate crimes. However, the Home Office adds that genuine increases cannot be ruled out.
In total, the police recorded 103,379 hate crimes in 2018-19. The majority were race hate crimes, accounting for around three quarters of the total.