Film production in Los Angeles rebounded to pre-pandemic levels in the second quarter of 2021, according to permit data released Thursday by FilmLA.

The film office recorded 9,791 shoot days from April to June of 2021 — the highest total since the last quarter of 2019 and higher than the average level for all of 2019.

The rebound coincided with California’s statewide “reopening” in June, though COVID cases have since spiked again with the fast spread of the delta variant around the country. A handful of productions have had to shut down since the increase began around July 4.

“By almost any available measure, the second quarter was good for filming in Los Angeles,” FilmLA President Paul Audley said in a statement. “With local COVID-19 cases rising it’s not clear whether that will be sustainable, but the industry’s commitment to community, cast and crew safety remains firmly in place.”

Television production led the way in the second quarter, surging to 4,913 shoot days — the highest level recorded in at least a decade. One possible explanation is that production took an extended hiatus after the winter break, due to the surge of cases in December, which led to several outbreaks on film and TV sets. That pushed some schedules back into the second quarter, causing a production glut in that period.

FilmLA collects data on location permits in Los Angeles and other cities in the county, which does not include shoot days in studio facilities. Nevertheless, its reports are seen as a good measure of overall production activity in the county.

Production plummeted during the pandemic, dropping 97% in the second quarter of 2020 from the same period in 2019. Production began to rebound last fall, as unions and studios reached an agreement on safety protocols on set.

Notable film productions in L.A. County in the most recent quarter included Steven Spielberg’s “The Fabelmans,” “Hollywood Stargirl” for Disney Plus and “Day Shift” for Netflix. TV productions included “The Dropout” for Hulu, “Impeachment: American Crime Story” for FX and “Gaslit” for Starz.