When 9-year-old Adrian came out as a transgender boy, he found acceptance at home but not at his school in the British city of Manchester, which refused to let him live as his chosen gender.
The headteacher would not support Adrian's transition from a girl to a boy and barred him from the boys' toilets and changing rooms. He was also bullied by classmates asking "what" he was.
He is one of a growing numbers of children coming out as trans, only to face a school system which divides pupils into boys and girls, from their uniforms to their sports teams.
And with most pupils in Britain heading back to class as the new academic year starts this week, experts fear many schools are ill-equipped or unwilling to cater for trans children despite a sharp rise in the number seeking help in recent years.
"There was nowhere for him really," said Adrian's mother who has transferred him to another school and did not want his real name to be published to protect his identity.
"It did have a marked impact ... He would not communicate with anybody and didn't have any friends. He would just stay by himself in the playground ... and was very sad and depressed."
Gender experts say there are likely to be tens of thousands of transgender children attending schools across Britain.
About 1 percent of people are transgender or non-binary, meaning they do not identify as either male or female, according to estimates from the British charity, The Gender Identity Research and Education Society.
The Tavistock and Portman NHS Foundation Trust, which runs the only specialized service for transgender children in England and Wales, has witnessed almost a tenfold increase in referrals in five years to more than 2,000 cases in 2016-17.
The harm of bullying
Transgender children are recognized as highly vulnerable, with studies showing they are more likely to be bullied, to suffer depression, and to self-harm or attempt suicide.
They face a school system filled with gender splits, from school uniform policies and single-sex changing rooms to sports teams and sleeping arrangements on residential trips.
It is a global problem. In Australia, a trans girl was forced to change for swimming behind a tree because she was unwelcome in both the girls' and boys' changing rooms at school.
American teenager Corey Maison was bullied so badly that her parents decided to homeschool her for a year.
And in Kenya, trans student Audrey Mbugua was forced to take the country's education authorities to court to get a school certificate in her new name.
While many schools are far more willing to adapt, making changes can touch on huge swathes of the day, from the layout of the building to the way classes are run.
"The question of gender just touches these deeply-rooted attitudes that people hold that are very personal to people as well as very pervasive socially and culturally," said Elizabeth Yarrow, an expert in gender at Cambridge University.
"I think schools are realizing there's a lot of things they do by default that are gender segregated activities, and they don't need to be," she told the Thomson Reuters Foundation.
Ms. Yarrow has been carrying out research with trans children and young people about their experiences in school, which varied from "very positive" to "completely horrendous."
Mermaids, a charity helping transgender children and their families, say they dealt with at least one case where a child attempted suicide as a result of their treatment at school.
"If schools are not proactive in tackling transphobic bullying, the impact in extreme cases can be fatal," said Lui Asquith, a caseworker for the charity.
Mistreatment by schools is unlawful
The majority of schools remain largely unaware of gender issues and do not put policies in place until they are dealing with a child coming out, say campaigners.
Critics say a 2010 equality law which makes it "unlawful for schools to treat pupils less favorably because of their gender reassignment," fails to give sufficient guidance.
More than three-quarters of lesbian, gay, bisexual, and transgender pupils said gender identity was never discussed at school, a 2017 report by the charity Stonewall found.
A 16-year-old trans boy used the Equality Act to sue his English private school in 2017 for refusing to let him wear a boy's uniform as he began his transition.
In emailed comments, a government spokeswoman said "the Department for Education will publish an update to its guidance for schools about how to apply the Equality Act 2010 in due course which will include how to support trans pupils."
Transgender charities say they frequently hear from families and schools scrambling to support a pupil coming out.
"It catches them unaware most of the time," said Susie Green, chief executive of Mermaids, adding that a lack of preparation adds to distress for the pupil involved.
"The schools who have never had a trans student may say, 'Well, we don't need to look at this because we don't have a trans kid at the school.'
"But they undoubtedly do if you are looking at 1 percent of the population. It's just that they are not out."
This story was reported by the Thomson Reuters Foundation.