German automaker BMW Group might have no choice but to close its British production plants and put thousands of jobs at risk, if the Brexit agreement hits the company’s supply chains for the Mini and Rolls-Royce.

BMW customs manager Stephan Freismuth stated that BMW would be pushed to reconsider production at its four UK plants, which manufactures Mini and Rolls-Royce vehicles, along with engines and body parts, if production set-up will have to stop at the border.

Like several UK car factories, the Munich-based firm relies heavily on imported components, with around 90 percent of the parts used in BMW’s British facilities coming from mainland Europe.

In addition, more than 80 percent of the Minis and 90 percent of Rolls-Royce cars are exported, while its engine plant in Hams Halls provides engines to a number of BMW factories in Germany.

Freismuth said BMW wanted to continue operations at its UK factories and that it was working on contingency plans. Since the year 2000, BMW has invested nearly £2 billion ($2.65 billion) in its British operations.