BMW AG 7-Series sedans stand at the assembly line of a PT Gaya Motor factory in Jakarta, Indonesia, on Wednesday, Nov. 30, 2016. BMW plans to boost its investments in startups, as competition intensifies with new rivals including Tesla Motors Inc. over technologies that make cars smarter and more energy efficient. Photographer: Dimas Ardian/Bloomberg
INTERNATIONAL - BMW AG is building its first factory in Europe in nearly two decades, strengthening its footprint close to home as growing protectionism adds to the cost of shipping cars around the globe.

The carmaker is investing 1 billion euros ($1.17 billion) in a new production plant in Hungary to produce 150,000 vehicles annually, according to a statement Tuesday. It’ll be BMW’s first new carmaking facility since 2000 in the region, when it built a site in Germany, a spokesman said.

BMW, like other global carmakers, is under pressure to adjust to shifting global trade politics that are undermining a decades-long move to lower barriers. Depending on what type of cars the company will build in Hungary, the plant could help offset growing risks. Making sport utility vehicles in Europe would help insulate BMW from rising trade tensions affecting its U.S. plant. It could also add flexibility to counter interruptions to the flow of Mini city cars, made in Oxford, England, to the European Union after Brexit.

“It looks like this is a decision led by risk minimization and cost optimization,” Juergen Pieper, a Frankfurt-based analyst with Bankhaus Metzler said. “Western Europe is too expensive, Mexico and the U.K. bear tariff risks, and the U.S. plant is already huge.”

BMW said it has no plans to make Mini cars in Hungary while declining to specify which models it’ll make at the new site. The company exports most of its popular SUVs from its Spartanburg, South Carolina, factory to Europe, a strategy that could become increasingly challenged if tariff threats become reality. The company picked Hungary as its newest production location, even as European sales of BMW and Mini cars rose only 1.2 percent during the first half, trailing growth elsewhere.

The German manufacturer announced Sunday it had raised prices for SUVs imported from the U.S. into China after the Asian nation increased tariffs, retaliating against President Donald Trump’s increase in levies on Chinese imports.

Separately, the company is grappling with the risk of Brexit hitting its facilities in the U.K. It exports Mini city cars, engines and Rolls-Royce vehicles worth some 2.4 billion pounds ($3.1 billion) from the country. The company last month again warned of the detrimental effect if a Brexit deal isn’t reached.

“We are now strengthening our activities in Europe to maintain a worldwide balance of production between Asia, America and our home continent,” BMW Chief Executive Officer Harald Krueger said in the statement.

Construction near the town Debrecen, about 124 miles east of Budapest, will start in the second half of 2019.

Earlier this year, BMW announced it’ll add the X3 SUV to its lineup of China-made models for local buyers, a prescient move that preceded an increase of Chinese import tariffs for U.S.-made cars to 40 percent as of July. The carmaker is also poised to become the first foreign car company to take majority control of its Chinese venture, a person familiar with the matter said this month.

Picking Hungary as its latest production site, adding to 31 production and assembly facilities globally, makes the luxury carmaker the fifth major producer to start a plant in the central European nation. Daimler AG, Volkswagen AG’s Audi brand, France’s PSA Group and Suzuki Motor Corp. Carmakers’ output reached 8.08 trillion forint ($29.45 billion) last year, or about 21 percent of economic product, according to official data.