Spending on film and high-end TV production in the U.K. topped £3.1 billion ($4.1 billion) in 2018, the second-highest figure on record, but down from 2017’s record-breaking £3.3 billion, according to figures released Friday by the British Film Institute.

Spending on high-end TV was up 4% from 2017 at £1.2 billion, the highest since tax breaks were introduced for big-budget shows in 2013. In the inward investment column, film, TV, and co-production spend was £2.4 billion, with film accounting for £1.6 billion of the total and TV the remainder.

The British industry is bracing for the impact of the U.K. leaving the European Union, which is scheduled for March 29. Amid the ongoing Brexit confusion, the country remains a production hot spot, with multiple new studio projects in the works.

The BFI data confirm that 2018 was a banner year for cinema admissions and box office in the U.K., notably at a moment when these figures were falling elsewhere in Europe.

Three of 2018’s top five grossing films at the British box office were made in the U.K.: “Avengers: Infinity War,” which pulled in £70.8 million, “Mamma Mia! Here We Go Again,” with £65.5 million, and “Bohemian Rhapsody,” with £52 million. Total British box office was £1.4 billion.

U.K. independent movies accounted for 12% of the box office, a 2% increase from the previous year.

In 2019, the new Bond film will go into production, spurring the film-production figures. On the TV side, “Game of Thrones” is coming to an end, but there is talk of Netflix setting up a U.K.-based production hub at Pinewood.

“In a time of seismic change, today’s figures prove that film and television are thriving, a vital creative industry that is outstripping other sectors,” said Amanda Nevill, BFI’s CEO. “With spend for film and high-end television production at almost £3.1 billion, we remain one of the most in-demand places in the world to create moving.image content.”

“Billions of pounds are spent every year on film and high-end TV in the U.K., and we will continue to back the sector to further strengthen this success story,” said Margot James, the British government’s minister for digital and creative industries.