The shortfall in U.K. truck drivers that’s causing widespread shortages of goods is caused mainly by British workers leaving the industry rather than foreigners unable to join.

Figures released by the Office for National Statistics show that the U.K. has lost 1 in 6 of its truck drivers in the past four years as older workers quit and the pandemic cut the numbers able to qualify for a license. Most of those were British nationals.

While government critics say Brexit restrictions have complicated efforts to fill the gap with foreign drivers, the figures shed light on home-grown reasons that caused the shortage in the first place. Officials have agreed to allow a limited number of visas to ease the supply crisis before Christmas.

About 268,000 people were employed driving heavy goods vehicles in the year through June 2021, down 53,000 from when the industry peaked in 2017, the ONS said. It estimated U.K. nationals account for 88% of those drivers, and 42,000 of them left the industry over that period.

More than half of drivers in the U.K. are 46 or older, and that group quit at the quickest pace. The number of driving tests in the first year of the pandemic was the lowest in a more than a decade, choking off the supply of new workers.

Official data showed 52,000 vacancies for posts in transport in the three months through September 2021, the highest since records began in 2001.