JK Rowling has attacked Scottish Labour over its support for the Scottish Government’s plans to help Scots to change their legal gender – claiming the party is ignoring “widespread opposition” from its own members.

The author wrote on Twitter that it meant “the Tories have been handed an open goal on safeguarding" women.

She also claimed the party was ignoring "public opinion", the UN and the Equalities and Human Rights Commission (EHRC).

Her tweet read: “Meanwhile @ScottishLabour continues to ignore public opinion, criticism from both the UN and the EHRC and widespread opposition from women in its own ranks and supports Sturgeon, meaning that the Tories have been handed an open goal on safeguarding.”

The author has courted controversy for her views on the debate and has been harshly critical of the First Minister’s plans to make gender self-identification easier.

Last month the Harry Potter creator wore a T-shirt emblazoned with the words: “Nicola Sturgeon: Destroyer of women’s rights.”

Critics have accused Rowling of being transphobic over her views on the gender debate – something the writer denies.

The legislation itself would allow Scots aged 16 or older to self-identify their legal gender without a medical diagnosis of gender dysphoria.

It would also reduce the time has to live in their chosen gender from two years to six months before they can receive a gender recognition certificate.

While Labour have so far supported the bill, a leaked report from the party’s women’s committee stated that nearly half of its female members did not support the legislation, citing “grave concerns”.

The document said that 45% of female respondents were against the changes, while 28% were supportive and 27% did not answer.

A Scottish Labour spokesperson said “Scottish Labour will work constructively to try and address concerns about this bill as it moves through Parliament.

“It is important that everyone has confidence in this legislation, but the Scottish Government have failed to build a consensus or provide the reassurance people need.

“Labour are committed to bringing people together, and we will pursue amendments to make sure everyone’s rights are protected.”