The prime minister has said people should not be criminalised "for stating simple facts on biology" in response to JK Rowling’s criticism of Scotland’s new hate crime law.
The author took to social media to hit out at the Hate Crime and Public Order (Scotland) Act which came into effect on Monday.
The law creates a new crime of "stirring up hatred" relating to protected characteristics.
Rishi Sunak said the UK had a proud tradition of free speech.
In a series of social media posts, Ms Rowling described several transgender women as men, including convicted prisoners, trans activists and other public figures.
The Harry Potter author, who lives in Edinburgh but who is understood to currently be abroad, then invited police to arrest her if they believed she had committed an offence.
The prime minister would not be drawn on whether he supported her approach, saying that it was "not right for me to comment on police matters, individual matters".
But he added: "We should not be criminalising people saying common sense things about biological sex, clearly that isn’t right.
"We have a proud tradition of free speech."
Under the new law, "stirring up hatred" relating to age, disability, religion, sexual orientation, transgender identity or being intersex is now classed as a criminal offence.
First Minister Humza Yousaf said the law was designed to deal with what he called a "rising tide of hatred" in society.
Writing on X, Ms Rowling said "freedom of speech and belief" was at an end if accurate description of biological sex was outlawed.
Ms Rowling, who has long been a critic of some trans activism, raised concerns that the law did not protect women as a group from hatred.
The Scottish government is expected to include this later in a separate misogyny law.
The maximum penalty under the new act in Scotland is a jail sentence of seven years.
A person commits an offence if they communicate material, or behave in a manner, "that a reasonable person would consider to be threatening or abusive," with the intention of stirring up hatred based on protected characteristics.
Stirring up hatred based on race, sexual orientation and religion was already illegal in Great Britain under the Public Order Act 1986, but that will also now fall under the new act in Scotland.
The bar for this offence is lower than for the other protected characteristics, as it also includes "insulting" behaviour.
Football pundit Ally McCoist has also given his support to JK Rowling, calling the legislation "madness".
Speaking on TalkSport radio, he said he, along with thousands of football fans, will flout the rules during this weekend’s Old Firm match between Rangers and Celtic.
The ex-Rangers player said: "I can guarantee you, next Sunday at Ibrox, I, along with 48,000 will be committing a breach of that hate bill in the particular Rangers Celtic game we are all going to."
Mr McCoist did not say which part of the Hate Crime Bill footballs fans were at risk of breaching.
Derogatory behaviour at football matches, including singing songs with sectarian connotations, are banned under the Offensive Behaviour at Football and Threatening Communications (Scotland) Act 2012.
SNP ministers, who brought in the legislation have been asked whether Ms Rowling’s comments, and acts such as mis-gendering would be classed as criminal under the new laws.
Speaking to BBC Radio’s Good Morning Scotland programme, Health Secretary Neil Gray said he would not comment on individual circumstances but said the "bar is much higher" that Ms Rowling was suggesting.
He said offences had to include the use of "threatening or abusive language or behaviour" and that the "protection of freedom of expression" was included within the legislation.
Mr Gray said the new law was an extension of existing laws that had protected people from hate crimes on the basis of their race under the Public Order Act 1986.
He said he hoped it would help tackle the "hatred that has been permeating across these isles for far too long" and that there would be similar protection to that offered in relation to race for the past 40 years.
Humza Yousaf said racist graffiti, which appeared near his home, is a reminder of why Scotland must take a "zero-tolerance" approach to hatred.
On X, he said "I do my best to shield my children from the racism and Islamaphobia I face on a regular basis. That becomes increasingly difficult when racist graffiti targeting me appears near our family home."
The graffiti on a wall near his Broughty Ferry home the same day the law was introduced.
Police Scotland confirmed it had been recorded as a hate crime under the new act.