GLASGOW—There is a dingy, narrow alleyway around the back of the Horseshoe Bar here that looks like a place where something unpleasant could happen. It is also one of the reasons Scotland’s biggest city has landed a recurring role as Batman’s hometown.

With its mix of neoclassical buildings and grimy back streets, location scouts have discovered Glasgow is an ideal match for Gotham City.

In...

GLASGOW—There is a dingy, narrow alleyway around the back of the Horseshoe Bar here that looks like a place where something unpleasant could happen. It is also one of the reasons Scotland’s biggest city has landed a recurring role as Batman’s hometown.

With its mix of neoclassical buildings and grimy back streets, location scouts have discovered Glasgow is an ideal match for Gotham City.

In the latest movie, “The Batman,” out next month, the Dark Knight revs his batcycle past museums, through city squares and up into a vast, hillside cemetery. Robert Pattinson, who plays Bruce Wayne, praised the city and its brooding architecture in the local Daily Record newspaper, calling Glasgow a brilliant Gotham.

The coming “Flash” movie, this time featuring Ben Affleck as Batman, was shot in part here. Warner Bros. is currently filming “Batgirl” for HBO Max in and around the alleyway near the Horseshoe, handing out blackout curtains and foam earplugs to residents who were wondering what all the fuss was about.

A mural of Batman and Robin is moved into position by set dressers as they prepare for filming in Glasgow in January.

Photo: Andrew Milligan/PA Wire/Zuma Press

City chiefs are thrilled that the bat-signal is shining over their town. Movie and television productions spent a record $57 million on hotels, restaurants and support last year, the Glasgow city council said, providing a boost after the slump from the Covid pandemic. Some Glasgow officials are hoping more will follow, maybe with an influx of tourists like those who flocked to Northern Ireland or New Zealand, to see where “Game of Thrones” and the “Lord of the Rings” movies were filmed.

David Burns, owner of A1 Comics in the city’s east end, says he has already seen fans from as far away as Liverpool and London drop into his store after the “Batgirl” crew made it over to look like a Gotham City liquor store.

David Burns, owner of A1 Comics in Glasgow.

Photo: James Hookway/The Wall Street Journal

“Yeah, it’s been good. We’re seeing a lot of new faces coming in,” he says.

Darren McGarvey, a writer and musician who performs under the name Loki, says “Anyone who’s into Batman already understood the parallels between our city and Gotham.” He points to how Sam Hamm, screenwriter for Tim Burton’s 1989 Batman film, described Gotham in the screenplay as if hell erupted through the sewers and kept going.

“That’s something many Glaswegians can relate to,” says Mr. McGarvey, a lifelong Batman fan.

Glasgow has had a number of makeovers over the years. They rarely stuck. A 1980s campaign saw black soot cleaned off city buildings and the town rebranded with the slogan “Glasgow’s Miles Better.” Better than what, exactly, was never made quite clear.

Glasgow stood in for Gotham City during filming of ‘The Flash’ in July 2021.

Photo: Euan Cherry/Zuma Press

In 1990, it was anointed European City of Culture, yet much of the art and literature emanating from Glasgow still dwelled on the poverty and violence that afflicted parts of the city after the demise of its shipbuilding industry.

Things have improved as new businesses grew; Glasgow has become a financial services hub and now produces more satellites than anywhere else in Europe. It was spruced up some more for the COP26 climate summit that it hosted last fall.

Its side hustle as Gotham gets to the heart of the place, though, says Laurence Grove, a professor at the University of Glasgow.

“No one’s going to mistake Glasgow for Venice,” he says, “But it does have duality between the everyday and the extraordinary, which is what superheroes are all about.”

A film set in Glasgow in January.

Photo: Andrew Milligan/PA Wire/Zuma Press

Movie producers began paying more attention to Glasgow at the turn of the century as filming costs spiraled in New York and other American cities. Its grid layout is unusual for somewhere in the U.K., making it a useful proxy for eastern seaboard cities in the U.S. The opening sequence for “World War Z,” the 2013 Brad Pitt zombie movie, was shot in Glasgow city center as a stand-in for Philadelphia.

“A lot of it is word-of-mouth,” says

Jennifer Reynolds at the Glasgow Film Office, a unit of the city government that helps liaise with film crews. “We were able to shut down that area for 15 days, which is difficult to do, and the location managers began to talk with each other.”

Since then, Glasgow has played San Francisco in “Cloud Atlas,” London in the “Fast & Furious” spinoff “Hobbs & Shaw” and New York in a coming Indiana Jones film.

Vincent Deighan, who drew Batman comics for DC Comics in the 1990s and 2000s, under his pen name Frank Quitely, grew up in Glasgow and still lives here. He says the city’s different layers fed into his own vision for Gotham, especially the hillside Necropolis next to the cathedral overlooking the city, where some 50,000 of the city’s great and powerful were buried. He credits it as the basis for how he drew Bruce Wayne’s parents’ grave.

“My own experiences growing up and living here shaped how I drew Gotham, so it’s fun to think about how it’s coming back to Glasgow,” he said.

Batman drives through the Glasgow Necropolis cemetery during filming in 2020.

Photo: Andrew Milligan/PA Wire/ZUMA PRESS

Next month, a new walking tour begins that takes in some of the city’s best-known filming locations. “There will definitely be some Bat-sights included,” said Liv Barber, one of the organizers.

Eight-year-old Isla Neil regularly went to the Trongate neighborhood of the city dressed up in her own Batgirl costume when “Batgirl” was being shot there. Directors Adil El Arbi and Bilall Fallah filmed a short video with her that they uploaded to Instagram.

Others gather at the city cemetery, taking turns to take selfies overlooking the cathedral and city’s old royal infirmary building, a centerpiece location in next month’s “The Batman.”

“It is just so dark, I love it,” says Catherine Ross, a student who came over for the day from Edinburgh with two of her friends. She was hoping to see some of the “Batgirl” cast members in town, including Leslie Grace, who plays Batgirl and J.K. Simmons, who plays Commissioner Gordon.

Locals say that the city risks becoming typecast from all the attention, though.

“I’d like to see Glasgow stretch itself a bit,” says Shona Ritchie, walking her dog nearby. “Like, maybe play a Caribbean island in a James Bond film. I’d pay good money to see that.”

Write to James Hookway at james.hookway@wsj.com