Several spectacular scenes set in the city last autumn are featured in the first trailer for the latest instalment of the Fast and Furious franchise, which will be released in the UK on 22 May.
Stars Vin Diesel, Tyrese Gibson and Chris “Ludachris” Bridges were all in the city for the shoot, which include filming of scenes on Waterloo Place, George Street, Melville Street and the Royal Mile.
Some of the stunts shot in Waterloo Place can be seen in the four-minute trailer, along with a spectacular overhead shot of the entire city. It was revealed during a special "Road to F9" concert in Miami, Florida, which was streamed live to fans on YouTube, Facebook, Instagram and Twitter.
The new film sees Diesel's character, Dominic Toretto, a reformed criminal and ex-street racer who has settled into retirement with his wife and son, face a deadly threat from his younger brother, Jakob, played by John Cena.
The globe-trotting Universal Pictures production - described as "one of the largest and most complex shoots" to use Edinburgh as a backdrop - also features scenes in London, Tokyo, Central America, Azerbaijan and Tblisi in Georgia.
An 800-strong crew worked on the production when it was in Edinburgh – around double the number involved in the night shoots on Avengers: Infinity War three years ago, which was worth an estimated £10 million to the economy.
The synopsis for the film says: "Vin Diesel’s Dom Toretto is leading a quiet life off the grid with Letty and his son, little Brian, but they know that danger always lurks just over their peaceful horizon.
"This time, that threat will force Dom to confront the sins of his past if he’s going to save those he loves most.
"His crew joins together to stop a world-shattering plot led by the most skilled assassin and high-performance driver they’ve ever encountered: a man who also happens to be Dom’s forsaken brother, Jakob.