Media playback is unsupported on your device Media caption 'I was sweating and anxious'

Secondary school teacher Daniel Gray has always kept his sexuality to himself at work. But to mark LGBT History Month, the 32-year-old from Brighton made the nerve-wracking decision to come out to more than 1,000 students. He tells his story to the BBC's Jennifer Scott.

I didn't actually know I was gay when I was at secondary school. But it seemed everyone else in 1990s Basingstoke did.

I was bullied every single day. I would get called homophobic names, be followed around by boys in gangs, pushed in corridors.

There was an openly gay boy at school being bullied too. But when we went to a teacher, she said it was just the kind of thing you had to put up with.

'Right a few wrongs'

I wanted to be either a teacher or a pop star, there was never doubt in my mind. Teacher turned out to be the most realistic goal.

It felt I could go back into a school and make up for the experience I had, right a few wrongs.

It wasn't until I went to university that I realised. Going to a final year house party as a plus one led to me meeting a lot of gay people and I just felt more at home and comfortable then I ever had been.

Image copyright Daniel Gray Image caption Daniel faced bullying throughout school, despite him not knowing he was gay until going to university in Brighton

I took my first job in 2008. But as comfortable as I was with my sexuality, words from my teacher training stuck with me. The woman who ran the course said categorically not to reveal it to pupils as "you don't want to give the students any more ammunition".

When I started working in a very strict Catholic school, I kept quiet. In my next school, I was "out" to colleagues but not to students - even though some of them probably knew.

'An instinct'

Two-and-a-half years ago, I started working at the Harris Academy in South Norwood, south London.

I never felt like being gay was an issue, but those words from training stayed with me still.

I had only ever heard of one other person who had come out at school, a teacher and campaigner called David Weston, but I didn't follow suit.

Until David came in to our school that is. He was just doing some training, nothing to do with LGBT issues at all, but I remembered him and thought again.

It felt like an instinct. It felt like something I had to do.

LGBT History Month was coming up. We had a new man [principal] in charge and I thought, here is my chance.

I thought I would have to go in and fight. But he said yes. He embraced it and told me he wanted to endorse it with all the staff.

So it was on. I was going to tell over 1,000 teenagers in Croydon that I was gay.

The big day

We teach across two sites so I couldn't be everywhere at once. As a media teacher, I decided to do a video.

I spoke about LGBT History Month, all the things the school was doing to mark it for the first time.

Then I looked directly into the camera and said: "As a gay man, I know how important it is to have positive role models."

Sat in those assemblies, pressing play, waiting for the reaction, I cannot describe my nerves.

But then I came on screen. There. I had done it.

Image caption Daniel told over 1,000 pupils he was gay

I didn't want it to be a big thing. I just wanted people to know I was there and to accept it as normal. Just having one teacher as a visible gay person in their lives could make a huge difference.

One student came up to me after the assembly who I didn't know. I have never taught him before. He looked very nervous and a little shy. But he had something to say.

"Sir, your assembly has changed my life."

He walked away. But that moment, that single moment right there, reminded me why I am a teacher.

'A safe space'

Another student said "Oh my God" and gave me a high five. I just could not have imagined that.

It hasn't all been rosy. We have had one complaint from a parent and we may get more.

But, this is not the lasting thought I have about that day. I want to focus on the positives.

What I found particularly moving was the support from colleagues who even made classroom displays supporting LGBT rights following my assembly.

Image copyright Nick Soar Image caption A sign put up by one of Daniel's Christian colleagues in their classroom

We are part of a federation of academies and, with the support of my head teacher, I am going to talk to others about going in and doing similar things.

By coming out to my students, they can see that Mr Gray, the teacher they already know, is no different from anyone else. They also know that if they are struggling or need the support, there is someone there they can turn to.

The only thing I would change? Not waiting nine years to do it.

Why I raised the rainbow flag at our school

Nick Soar, executive principal of Harris Federation South and Upper Norwood

Image copyright Daniel Gray

When Daniel asked me if we could foreground LGBT month, I knew it was a moment early in my tenure to highlight to the staff and pupil body, and all parents, that I wanted to eliminate homophobia and, more widely, all forms of prejudice and hate.

Ofsted, the schools' watchdog, is absolutely clear about language of prejudice and homophobia. Inspectors are explicitly told to examine if schools are aware of their statutory duties.

The pastoral support for LGBT young people and staff has often been appalling in schools. I see it as my role as the leader of the ethos and values to be both the lightning rod of any complaints and the beacon of hope for all pupils.