What are the parties saying about women's rights and gender identity?
Sir Keir Starmer and Rishi Sunak were both quizzed about women-only spaces in their final head-to-head debate before the election.
So what have the main parties said about transgender rights, women's rights and gender identity so far?
Conservatives
Prime Minister Rishi Sunak has suggested voters face a "crystal-clear choice" at this election about the protection of single-sex spaces.
The Conservatives say that - if re-elected - they will "protect female-only spaces and competitiveness in sport", by rewriting the Equality Act to make clear that sex as a protected characteristic means biological sex.
"Keir Starmer has not matched my pledge to reform the Equality Act to pass new law...he's not sure, like I am, that sex means biological sex, and that's how you protect female-only spaces and services," the PM told the audience at Wednesday’s debate.
Guidance around the Equality Act says certain spaces can be single-sex only, if it is proportionate and intended to achieve a legitimate aim such as privacy or the prevention of trauma.
The Conservatives suggest change is needed to clarify that sex in this context means biological sex.
Some people believe that trans women – that is, people who were born male but who now identify as female – should have access to the single-sex spaces and events that are specifically for women.
This is contested by some women’s rights groups, and they are pressing for clarification of the Equality Act so that single-sex spaces such as women’s prisons, rape crisis centres, sports teams and changing rooms, are only open to biological women.
In May, the government released draft guidance that schools in England "should teach the facts about biological sex and not use any materials that present contested views as fact, including the view that gender is a spectrum".
Parents would have a right to know if their child wants to be treated as the opposite sex, the Conservative manifesto says, with schools having to involve parents in decisions about their children.
Unlike Labour and the Lib Dems, the Conservatives have not promised to ban conversion therapy, which attempts to change someone's sexual orientation or gender identity.
There is no legal definition, but in practice it means trying to stop or suppress someone from being gay, or from identifying as a different gender to their sex recorded at birth.
Theresa May first pledged to ban it in 2018, and the government launched a consultation about how that would work.
But the party now says it needs to take more time before deciding whether existing laws are strong enough or extra protection is needed.
Labour
Sir Keir Starmer defended his position on single-sex spaces in Wednesday's debate.
"It's very important that we protect female-only spaces," he said, adding that he treats transgender people "as I treat all human beings - with dignity and respect".
He referred to guidance around the existing Equality Act, which says that a trans person with a Gender Recognition Certificate could be prevented from using a single-sex service in some circumstances.
It is not the first time he has been challenged about his messaging around women and transgender people.
In 2021, Labour MP Rosie Duffield, who has consistently argued that sex is a matter of biological fact, posted a message on social media stating: “Only women have a cervix." Questioned about this, Sir Keir criticised her position, saying it was “not right”.
But in a recent BBC Question Time debate, he said he agreed with former Prime Minister Tony Blair’s comment, that "biologically, a woman is with a vagina and a man is with a penis".
He followed that up by saying some people don’t identify with their birth sex, adding: "My view in life is to respect and give dignity to everyone, whatever their position."
He suggested his earlier comments were made in the context of a “toxic” and “hardline” atmosphere around trans rights.
His comment prompted author JK Rowling to write in the Times newspaper that she would “struggle” to vote for him.
She said she was propelled by “freedom of speech and observable truth” and believed Labour was “dismissive and often offensive” towards women fighting to retain sex-based rights – she said the party had “abandoned” women.
Labour’s education spokeswoman has refused to clarify whether the party would scrap the Conservatives’ proposed ban on schools in England teaching pupils about gender identity.
Bridget Phillipson told the BBC protected characteristics such as gender reassignment should be taught “but on a factual basis at an appropriate age…[not] based on contested ideology”.
In its manifesto, Labour has pledged to ban conversion therapy, and would include transgender people in that ban.
It has also pledged to remove the “indignities” from the process of applying for a gender recognition certificate, which allows a person to change their legal sex.
It pledged to "modify, simplify and reform" the process, while keeping the requirement for a medical diagnosis of gender dysphoria
Liberal Democrats
The Lib Dems would seek to completely overhaul the gender recognition process, removing the requirement for a medical diagnosis if a person wanted to change the sex listed on their birth certificate.
Like Labour, the party promises to ban conversion therapy outright, while non-binary identities - those who do not consider themselves to have a solely male or female identity -would be recognised in law.
The party says it would also require large employers to monitor and publish data on LGBT+ employment levels, pay gaps and progression, building on the mandatory reporting around gender pay gap data that already exists.
Scottish National Party
John Swinney, who took over as SNP leader in May, has said he will "wait and see" after the general election about pursuing changes to gender recognition rules.
The party had previously tried to enact a controversial bill that would allow transgender people to change their legal sex through self-identification - so without the need for a relevant medical diagnosis.
It was blocked by the UK government last year, on the grounds that it would interfere with equality law in the rest of the UK.
Previous SNP leaders Nicola Sturgeon and Humza Yousaf backed the idea of self-ID, but in 2019 some Scottish MPs, including the now-deputy leader Kate Forbes, urged the Scottish government not to rush into "changing the definition of male and female".
In its election manifesto, the party says that if Scotland were to become independent from the rest of the UK "we would have the full powers to improve equality in law and society".
Reform UK
In its list of pledges, Reform UK says “divisive, ‘woke’ ideology has captured our public institutions”.
The party says “transgender indoctrination is causing irreversible harm to children”, and plans to ban what it describes as “transgender ideology” in schools in England. In practice, this means “no gender questioning, social transitioning or pronoun swapping”.
The party would also scrap the Equality Act and diversity, equality and inclusion rules, which the party suggests are lowering economic productivity.
When leader Nigel Farage was recently asked on BBC 5Live how he would interact with transgender people as the opposition party, he said that “while we should respect the rights of transgender people…we equally must respect the rights of women too, and women-only spaces”.
He also suggested that a scenario in which someone who had gone through male puberty competed in a women’s swimming race “shouldn’t happen”.
Green Party of England and Wales
The Green Party supports the idea of trans and non-binary people to be legally recognised in their chosen gender through self-identification.
It also supports a change in law so an ‘X’ could be added as a gender marker in the passports of non-binary and intersex people, if they wanted to use it.
Plaid Cymru
Like the Lib Dems and others, Plaid Cymru would seek to introduce a policy of self-identification if someone wanted to change their legally recognised gender, without the need for a medical diagnosis.