Fans pose in front of Hogwarts castle at the Grand Opening of the 'Wizarding World of Harry Potter' to the public at Universal Studios Hollywood, in Universal City, California, on April 7, 2016. VALERIE MACON/AFP/Getty Images)

LOS ANGELES — The magic of Hollywood made Los Angeles the entertainment capital of the world. The spell of a wizard might help keep it that way.

The Wizarding World of Harry Potter attraction, which opened at the crack of dawn Thursday at the Universal Studios Hollywood theme park, is expected to bring upwards of a million fans of J.K. Rowling’s boy wizard book and movie franchise to Los Angeles. But maybe more importantly for Universal and the city, that cash haul should help fuel a major, in-progress expansion of the hilly LA campus that contains its theme park and studio complex, which includes much-needed sets and soundstages to accommodate the filming that’s returning to Hollywood in droves.

Universal’s LA theme park is riding high after being a mostly forgettable destination during the late 1990s and early 2000s, despite being a short drive from the heart of Hollywood’s tourist zone in the eponymous Universal City neighborhood. Between 2009 and 2013, attendance jumped by nearly one-third. And when Universal opened its Wizarding World attraction at Universal Studios Florida in Orlando, attendance soared 30 percent year over year, and revenues and profits at Universal’s theme parks division have also grown by double digits, according to parent Comcast Corp.’s SEC filings.

While Disneyland still reigns supreme among Southern California theme parks — welcoming 16.8 million visitors last year compared with Universal Studios’ 6.8 — Universal is closing the gap behind attractions like Fast and Furious: Supercharged and Transformers 3D. Its attendance jumped 36 percent between 2010 and 2014, compared with a 5 percent uptick at Disneyland, which hasn’t built a notable new ride in a while. And Wizarding World could very well cause Disneyland to take a hit as locals prefer to check out the new exhibit, as happened in Florida — although Universal Studios Hollywood and Disneyland are much farther apart than Universal Studios Florida and Walt Disney World, and on opposite sides of LA’s main population centers. Disneyland is also currently developing a "Star Wars"-themed area.

Theme park arms race aside, Wizarding World’s lasting impact might be on Universal’s backlot, which is showing its age and getting crowded at a time when Hollywood needs all the filming capacity it can round up.

After years of losing production to places like Georgia, North Carolina and Canada, which offered generous tax incentives for filming, Hollywood decided to fight back. A law that took effect last year tripled the funding of its film incentives and allowed producers to offset up to 25 percent of the costs of qualified feature film and TV production expenses, and shows such as “Veep” and “American Horror Story” have moved their production to LA.

Those tax credits, combined with an explosion of new scripted television series, have kept LA’s soundstages full. Television production shoot days in greater Los Angeles have gone from 11,329 in 2011 to 15,706 last year, according to film permitting organization FilmL.A., which also credits the ambitious original content plans of Netflix and Amazon Prime with stimulating that boom. But all that welcome work is straining the city’s prop houses, caterers — and of course, soundstages.

The stage and prop shortage is an issue in popular shooting locations across the continent, but it is particularly acute in Los Angeles, where a lot of film facilities are old and there’s not a lot of available real estate on which to build cavernous, hangar-like soundstages, which tend to be giant beige or gray buildings that add nothing to neighborhood charm. And competitors like North Carolina and Georgia, in trying to drive their own film industries, have upped the ante with ultramodern facilities and have plenty of land to add more.

Will Wright, the public affairs director for the Los Angeles chapter of the American Institute of Architects, told International Business Times that studio space built on infill locations in Los Angeles — like Universal City — “supports the retention of jobs in the entertainment industry and keeps production in our region.”

That’s where Harry Potter can help. As part of the $1.6 billion Universal Evolution Plan — which includes Wizarding World and other theme park improvements — Universal Studios is getting several new soundstages, sets and technical facilities. A windfall from Wizarding World — combined with the performance of Universal’s film studio, which had a huge 2015 on the strength of international blockbusters like “Jurassic World” and “Fast and Furious 7” — could help speed up that construction and get LA’s filming facilities up to speed to meet the demand for new shows.

Where else could a fictional British boy wizard mean so much to an important industry? Only Hollywood.