(Adds winner's comments from stage; background)
By Steve Gorman
LOS ANGELES, Feb 24 (Reuters) - Rami Malek won his first Oscar on Sunday as best lead actor for his portrayal of singer Freddie Mercury, the flamboyant late frontman of the British rock band Queen, in the musical drama "Bohemian Rhapsody."
Malek, 37, had emerged as a favorite for the Oscar in recent weeks after winning Golden Globe, Screen Actors Guild and British BAFTA awards.
A Los Angeles native of Egyptian descent, Malek took on the role of Mercury, born to ethnic Parsi parents from India who moved their family to England when their son was in his late teens.
The film dramatizes the origins of Queen and Mercury's personal battles, including his struggle with his sexuality and drug and alcohol use. In 1991, he was one of the first British celebrities to die from AIDS, at age 45.
Taking the stage to accept his award, Malek drew parallels between his and Mercury's real-life experiences in coming to grips with their personal identities and finding their voices as artists.
"We made a film about a gay man, an immigrant, who lived his life just unapologetically himself, and the fact that I'm celebrating him and this story with you tonight is proof that we're longing for stories like this," Malek said.
"I am the son of immigrants from Egypt. I'm a first-generation American, and part of my story is being written right now," he said to applause.
Being neither a singer, dancer nor piano player, Malek took voice, movement, piano and guitar lessons, and spent months studying archival footage of Mercury to capture his accent, his strutting stage demeanor and the way he commanded a microphone.
"I may not have been the obvious choice (to play Mercury), but I guess it worked out," Malek told the Oscar audience.
He also thanked the two surviving, active original members of Queen, guitarist Brian May and drummer Roger Taylor, who opened the Oscar telecast with a raucous performance of two of the band's biggest hits - "We Will Rock You" and "We Are the Champions."
The closing section of the film recreates almost move by move the famed Live Aid benefit concert in London where Queen played in July 1985.
In addition to Malek's win for best actor, the film earned Oscars for film editing, sound editing and sound mixing.
Filmmakers used a combination of Mercury's real voice, Malek's voice and another singer against the band's original recordings to showcase Queen's hits. The soundtrack elements are so closely interwoven that Malek has said he cannot tell who is singing at any particular point.
Malek has said that getting the prosthetic for Mercury's famously jutting teeth, a special dental appliance the actor started wearing a year before shooting the film, was key to his performance.
"Bohemian Rhapsody" was Malek's biggest film role in a 15-year career as an actor. He was previously best known for playing the socially awkward hacker Elliot Anderson in the TV series "Mr. Robot," for which he won an Emmy award in 2016.
Other television and movie roles include "Papillon" and "BoJack Horseman."
Malek won the Oscar despite negative publicity around the film. "Bohemian Rhapsody" director Bryan Singer was accused of sexual misconduct involving underage men in the 1990s in an article published in January this year by The Atlantic magazine.
Singer, who was fired in 2017 towards the end of filming after clashing with some cast members, issued a statement denying the accusations. Malek has said he was not aware of the accusations against Singer while filming. (Reporting by Jill Serjeant and Steve Gorman in Los Angeles; Editing by Sandra Maler)