It would be one of the most important flights in film history. When a young 5ft 7in actor with long hair and ponytail rocked up on a motorcycle, a group of US navy pilots were all too happy to test his need for speed.“They look at him and they don’t know who Tom Cruise is,” recalls screenwriter Jack Epps Jr. “They do what they like to do: they took him up, they shook him around, he barfed on himself, and he came out and said, ‘I love this.’ From that moment, he was on.”Cruise’s experience that day with the Blue Angels, the US navy’s premier flight demo squadron, would inspire him to become a licensed pilot. He would also accept the role of Maverick in Top Gun, a movie about cold war flying aces that redefined the modern blockbuster. Co-written by Epps and Jim Cash, directed by Tony Scott and produced by Jerry Bruckheimer, it turns 40 on Saturday.Top Gun charts reckless navy pilot Maverick’s rivalry with Iceman (Val Kilmer), romance with instructor Charlie (Kelly McGillis) and guilt over the death of co-pilot Goose (Anthony Edwards) in a training accident. He is sent on a dangerous rescue mission, saves Iceman and gains redemption, with Iceman telling him: “You can be my wingman anytime.”The high-testosterone slice of Ronald Reagan-era Americana – with a homoerotic game of beach volleyball thrown in – made 23-year-old Cruise a star and drove a spike in military enlistment; the navy even set up recruitment tables in cinemas. It eventually spawned a hit sequel in 2022, with a third instalment now on the way.It all began in 1983 when Bruckheimer was flicking through the May issue of California magazine. “Top Guns” read a headline, with a big photo from inside the cockpit of an F-14 fighter jet. The article began: “At Mach 2 and 40,000 feet over California, it’s always high noon.”Speaking from Los Angeles, Bruckheimer, 82, recalls: “I saw the magazine article and it looked like Star Wars on Earth and I threw it to my partner, Don Simpson, and then he called in one of our executives and said, ‘Let’s get the rights to this,’ and that’s how it started.”The pair pitched the idea to producer Jeffrey Katzenberg, then head of production at Paramount, and he was impressed. When Katzenberg floated five or six ideas to screenwriters Cash and Epps over breakfast one day, Top Gun was among them. Epps, who had a private pilot’s licence, seized on it.The 76-year-old, based in Santa Monica, recalls: “I said, ‘Wow, this will be great, I get to fly in the jet plane!’ We didn’t have a movie made yet. Even if it didn’t get made I’d get a jet ride out of it, so that’s a pretty special thing. My partner didn’t like to fly so I had to talk him into it but that was no problem.“We met with the producer Simpson. Bruckheimer and I said my concern is if we’re gonna do this project, we have to go up in real planes. We can’t have some special effects of planes; it has to be the real things.”This requirement was central to the pitch made to the Pentagon to secure military cooperation. “I pitched the idea of how we see these young American heroes and they said, ‘Sounds interesting and we’ll let you use our equipment. You know, you’ll have to fly in a navy jet?’ I said, ‘Oh, no, really?! How fast can I get down there?’”Epps was dispatched to the Marine Corps Air Station Miramar to immerse himself in the cloistered, elite subculture of naval aviators. He interviewed 30 pilots but the true revelation came when he was strapped into the back of a jet at full throttle.“I had to go through training, which gave me a lot of ideas,” he says. “Before I could go up, I had know how to eject and go through what is called the helo dunker, where they put you under water and you have to go out in a very systematic manner. All these crazy things were great because it gave me a full feeling for it.“We got up in the air and they said to me, ‘We shouldn’t be doing this but we’re gonna do it anyway,’ so they did a lot of close passes. We pulled six G’s and I learned that, when you’re pulling G’s, although you do have a special uniform that compresses your legs, you’ve got to grunt to keep the blood up in your brain.”Kelly McGillis and Tom Cruise in Top Gun. Photograph: Paramount/Sportsphoto/AllstarEpps continues: “It was phenomenal and the speed was amazing. I had never felt that in my life. The skill of these guys to be able to pull that hard-G turn, come up over the top, cross each other, barrel roll again, come back and go back in high-speed passes was fabulous.“When I got down, I called my partner and said, ‘Jim, this is not what we thought this was. These guys are athletes, they’re strong, this is about speed we’ve never seen before in our life.’ We both were athletes – Jim played football in high school, I played ice hockey up until my 30s – and so we took an athlete’s view of this. These guys were very special and athletes like to compete with each other.”But as Epps watched F-14s taking off and landing, he realised there was still a plot-sized hole at the centre of the project. Drama demands friction but the pilots at Miramar were entirely unified. “I’m looking at these guys and they’re all getting along because they’re all about teamwork and I’m going, ‘What am I going to write about? What is the story here? What’s the conflict?’“I’m racking my head and I go, ‘Oh, what if one guy doesn’t get along? What if one guy is out to be the star? It’s about him and now you’ve got this bump in this situation.’ That’s the beginning of the character Maverick where we said, ‘OK, here’s where the conflict comes from internally. Somebody wants to be the best here at top gun school.’”The emotional anchor of the film – the shocking mid-point death of Maverick’s radar intercept officer Goose – was a narrative risk directly inspired by the profound grief that Epps had witnessed among the real-life pilots.“We went out and we had a coffee together and I was sitting around with about six, seven guys and they started talking about the friends that they had lost in Vietnam. This was 15 years later and I could see they were still deeply mourning the loss of their colleagues and the fellow pilots and I was very taken by the sincere emotions they had.“I had a thought to myself as a writer: if I could get the audience to feel what they feel, the sense of loss, I will have achieved something. That’s when I got the idea to lose Goose in the middle because it would bring the audience in, they’d feel a sense of loss, like what it means to lose a pilot, lose a friend, and so we went with that and it’s quite a moment.”With the script taking shape, the vital question of casting loomed large. The role of Pete “Maverick” Mitchell required an actor of singular charisma and swagger. For Epps, there was only one choice. “I was a Tom Cruise fan at that time – still am – so we wrote this with Tom Cruise in mind as Maverick. I loved his movies: he’s such an energetic actor, he connects with the audience.“We were finishing up the script and I turned it over to Jerry Bruckheimer at the gates of Bel Air on a Saturday night. I said, ‘Jerry, think Tom Cruise when you read this.’ He read it and so did Don and they both said, ‘Yeah, love the script. Tom Cruise: great idea.’”Bruckheimer echoes this sentiment, confirming that Cruise was their immediate target. However, securing the young star – who had grown his hair long for Ridley Scott’s fantastical film Legend – was not a straightforward task.Bruckheimer recounts: “We couldn’t quite get him to commit so I arranged for him to fly with the Blue Angels in El Centro, California. He had long hair and a ponytail and they saw this guy walk up and they said, ‘We’ll get this hippy a real ride.’ They sure did and he got out of the plane, walked to a phone booth, because there were no cell phones then, called me up, said, ‘I’m in.’”Pete Pettigrew, a former top gun instructor, served as a crucial technical adviser. Once production commenced under the visionary eye of Scott, the film had to balance its spectacular aesthetic ambitions with its emotional core. Bruckheimer admits that the process of editing Top Gun was a delicate negotiation between visual grandeur and narrative substance.Tom Cruise in Top Gun. Photograph: Paramount/Allstar“We watched it in various stages. We watched some early cuts, which were more style over substance, and that’s where Tony comes from. He’s an amazing artist and commercial director and he’s a brilliant visualist and he over-indexed in that area, and then we sat with him, the editor, and went through every scene together and brought it back to the movie that’s out there.”After an initial reluctance, the US military had seen the potential of Top Gun to burnish its image and encourage young people to sign up. But this cooperation has fuelled a persistent critique from the left over the ensuing decades: that Top Gun is an overly jingoistic, pro-war recruitment tool wrapped in a pop soundtrack.Epps rejects this reading, preferring to view the film through the deeply personal lens of the service members he interviewed. “These are great American heroes and they put their lives on the line every day for America. They love the country and they’re there to protect us so it’s a little silly to not honour our veterans and our people in the military who basically protect us.“These are heroes. You’re always going to hear somebody say that but in no way was it suggesting that they’re creating wars. They’re basically there to protect. They are the tip of the spear and out there every day putting their lives on the line for us.”Despite the confidence of the film-makers, the road to release was fraught with unknowns. An early test screening in Houston, immediately after the explosion of the Challenger space shuttle, left the production team anxious. Bruckheimer admits: “There was no laughter, there was nothing. It was just dead and we thought for sure it was a disaster. Then when the numbers came back it scored high and we were shocked.”Epps recalls the first time he saw the film at a private screening. “It was sensational. What was so great about Tony Scott’s directing is he understood this sense of speed, the sense of the G-forces, and he was able to shoot it, edit it. That made the audience feel like they were flying in a jet. Tom’s performance was great and the music was fantastic.”Although the critic Pauline Kael branded it a “shiny homoerotic commercial”, Top Gun earned $357m worldwide to become the No 1 film of 1986 while its accompanying album was the bestselling soundtrack. The song Take My Breath Away by Berlin went on to win the Oscar for best original song.As Bruckheimer continues to work on the highly anticipated third film, he points to a singular reason why Top Gun continues to endure. “Tom Cruise,” the producer states emphatically. “He’s the hardest-working actor in Hollywood and has amazing instincts. He is somebody that just won’t let anything go by unless it’s worked out. He wants to make movies for an audience and that’s what he does.”