The Holywood titans are set to play different versions of Batman in the upcoming film The Flash, which will star Ezra Miller as the eponymous superhero.
It is understood that the film, co-written by Christina Hodson (Birds of Prey), is based on the well-known ‘Flashpoint’ storyline from The Flash comics, and will see the Scarlet Speedster travel back in time to prevent his mother’s murder.
In doing so, however, he will unwittingly splinter the future into alternate timelines - with Michael Keaton’s Batman emerging from one of them.
Mr Keaton, 69, first played the Caped Crusader in 1989’s Batman, reprising the role three years later in Batman Returns.
It is not known whether the the Oscar-winner will shoot any scenes in the Capital.
Mr Affleck, meanwhile, has played Bruce Wayne’s alter ego in two previous instalments of DC’s Dark Universe franchise.
The Flash will also star Sasha Calle as Supergirl and Ron Livingston, of ‘Office Space’ fame, as Henry Allen.
Production on the film is already underway in London, with a host of cast and crew members ready to travel to Edinburgh and Glasgow to continue principal photography in June this year.
It is not yet known which locations around the Capital will be used for the movie, but crews are expected to close several streets around Edinburgh’s city centre when they arrive.
Local residents are not unaccustomed to seeing big-budget productions roll into Edinburgh and other Scottish cities in recent years.
In 2017, the Royal Mile and Waverley Station were used to stage a dramatic battle in the billion-dollar blockbuster Avengers: Infinity War.
Two years later, Will Ferrell’s spoof hit Eurovision took advantage of a host of locations across the city, including Albany Street, George IV Bridge and Calton Hill.
Scottish superhero fans are still eagerly awaiting the release of Robert Pattinson’s dark adaptation of The Batman after the actor was seen on the film’s location in Glasgow in 2020.