The Imitation Game screenwriter Graham Moore has won the Academy Award for best adapted screenplay, defeating newcomers and veterans alike at the 87th annual Oscars with his first produced screenplay.

Moore’s acceptance speech marked the first time on the awards circuit he mentioned an attempted suicide as a youth, rousing the audience to a standing ovation with his message of hope. The Weinstein Company’s The Imitation Game tells the story of Alan Turing, the father of modern computing, who cracked impossible German codes in World War II and helped end the war. But Turing was subsequently convicted under the UK’s anti-gay laws of the 1950s. He ended his own life two years later.

“So here’s the thing,” Moore said onstage after thanking his Imitation Game crew. “Alan Turing never got to stand on a stage like this and look out at all of these disconcertingly attractive faces. And I do. And that’s the most unfair thing I think I’ve ever heard. So in this brief time here, what I want to use it to do is to say this: When I was 16 years old, I tried to kill myself, because I felt weird and I felt different, and I felt like did not belong. And now I’m standing here, and so I would like this moment to be for that kid who’s out there who feels weird or feels different or feels she doesn’t fit in anywhere. Yes you do. I promise you do.

“Stay weird, stay different, and then when it’s your turn, and you are standing on the stage, please pass the same message to the next person who comes along.”

Moore said backstage after his win that moment in his speech “was really hard. But I’m a writer, when am I ever going to be on television? I might as well use it to say something useful.” He later expanded, admitting, “Depression is something I have dealt with every day of my life since (I was a teenager). I have a family who was supportive then and is supportive now. I’m very aware of how lucky I am.”

Adapted screenplay was one of the most up-for-grabs categories at this year’s ceremony. The Theory Of Everything scribe Anthony McCarten and Whiplash writer-director Damien Chazelle were also considered frontrunners. Moore had previously won this awards run at the USC Scripter Awards but saved up for the biggest of prizes.

“I’ve been obsessed with Alan’s story since I was a teenager,” Moore said. “He was always a tremendous hero of mine. He always seemed like the outsider’s outsider, for so many reasons. He was the smartest guy in any room he entered. He was a gay man. He was keeping all these secrets from the government. Because he was apart from society he was able to see the world as no one else had.”