Rami Malek almost had a cameo appearance as Freddie Mercury in the Elton John biopic Rocketman.

The Bohemian Rhapsody star, who won a Best Actor Oscar for his portrayal of the late Queen frontman earlier this year, came close to filming a surprise cameo in the movie opposite Elton John actor Taron Egerton, courtesy of director Dexter Fletcher.

In an interview with Gay Star News, Fletcher revealed that he initially loved the idea of briefly cutting to Malek as the iconic singer met with manager John Reid, but it didn't work out.

"There was an idea I had at one point, where Elton's in a restaurant with his mother. I thought John Reid and Freddie could be at another table and they wave at each other," he said. "That would have been amazing, but it didn't come to pass."

Reid managed both Mercury and John. He is portrayed by Aidan Gillen in Bohemian Rhapsody and Richard Madden in Rocketman.

As for why the bold idea never came to be, the filmmaker worried it would have been too distracting for the audience, joking that the films are not part of a franchise like instalments in the Marvel Cinematic Universe are.

"It would've been a little too knowing," the 53-year-old added. "I'm not looking to set out to make a cinematic universe."

Fletcher served as director on both films, having taken over from Bryan Singer on Bohemian Rhapsody after he was fired.

At Rocketman's Cannes Film Festival premiere, producer Matthew Vaughn told Screen Daily he'd put Fletcher forward as Singer's replacement as he figured it would be good preparation for him before he started on Rocketman.

"'Dexter, you're going to a 1970s biopic university, find out how to do it, how not to do it, and experiment on their dime,'" he commented. "It was really helpful for all of us - Dexter got to flex his muscles before going into the main race."