Ashlyn Parram had dressed for her exam at The Giles Academy in Boston, Lincolnshire in tights, a blazer and a skirt. Upon arrival she was told by staff to go home and change into boys' school uniform.
Furious at being told to change, Ashlyn printed off the law on sex discrimination and presented it to her headteacher, Chris Wall.
He acknowledged that he could not ban Ashlyn from taking the examination in her skirt and tights - but made her sit away from other pupils.
The youngster - who was previously known as Lewis - told The Sun: "I have never felt so bad about myself.
It's sad people can't be more open-minded. I've lost a lot of friends because of everything I've been through. I really didn't need to lose the support of my teachers.
The teenager has lived as a girl at home for the past two years, but to avoid getting picked on 'toned down' her image for school.
She claims she has been spat on and hit in the street, and her mum, Miranda Johnson, says has been officially diagnosed with gender dysphoria and is a girl born in a boy's body.
Miranda, who works as an IT manager, said the school had treated Ashlyn in an 'appalling' way.
"If Ashlyn had been black or disabled there would be uproar. She's a vulnerable teenager who needs the support of her teachers, not their opposition. The way they've treated her is disgusting."
The youngster has had a number of issues with the school over the past year: The Sun reports that teachers previously insisted Ashlyn take part in swimming lessons with boys which she found humiliating, despite being allowed to wear a surf top and change alone. On another occasion, her parents allege a senior member of staff told them gender dysphoria did not exist, and a female teacher was reprimanded for copying the way Ashlyn walked.
Miranda, who is recovering from breast cancer, has now lodged an official complaint against the school, citing discrimination because of Ashlyn's gender.
A spokesman for the Giles Academy said that the school's governing body 'rejects all the allegations.'
What do you think?
Should Ashlyn have been given more support by the school, especially in the run-up to a GCSE exam?