LONDON (AP) - J.K. Rowling did not break the law with tweets criticizing Scotland's new hate speech law and referring to transgender women as men, the police said Tuesday.

The “Harry Potter” author opposes the law, which came into force on Monday and makes it illegal to stir up hatred on the basis of characteristics such as age, disability, religion, sexual orientation and transgender identity.

Rowling is among critics who say the legislation could be used to silence so-called “gender-critical” feminists, who argue that rights for trans women should not come at the expense of those who are born biologically female.

In a series of posts on X, Rowling referred to several prominent trans women as men. Misgendering could be an offense under the new law, in some circumstances.

Rowling posted that “if what I've written here qualifies as an offence under the terms of the new act, I look forward to being arrested.”

“Freedom of speech and belief are at an end in Scotland if the accurate description of biological sex is deemed criminal,” she said.

Police in Scotland said the force had received complaints, but that “the comments are not assessed to be criminal and no further action will be taken.”

Scotland's semi-autonomous government says the new legislation - known as the Hate Crime and Public Order (Scotland) Act - will help tackle hatred and abuse.

Critics, however, say it will have a chilling effect on free speech.