Sam Smith dedicated his Oscar for Best Song to the LGBT community Sunday night.

The British recording artist won the honor for "Writing's on the Wall" from the James Bond film Spectre.

"I read an article a few months ago by Sir Ian McKellen and he said that no openly gay man had ever won an Oscar, and, if this is the case, even if it isn't the case, I want to dedicate this to the LGBT community all around the world," Smith said.

"I stand here, I stand here tonight as a proud, gay man and I hope we can all stand together as equals one day. Thank you so much."

Oscars host Chris Rock -- who had been making jokes about the lack of diversity in Hollywood all evening -- appeared on stage after Smith accepted his award and quipped: "Congratulations. No jokes there. Not going to get me in trouble."