Tesla CEO Elon Musk said during an awards ceremony in the German capital Tuesday evening that "we've decided to put the Tesla Gigafactory Europe in the Berlin area."
The company will also set up an engineering and design center in Berlin, Musk said. He wrote on Twitter that the new plant "will build batteries, powertrains & vehicles, starting with Model Y."
The Model Y is a small SUV scheduled to go on sale in the fall of 2020. It will start at $39,000 (35,400 euros) with a range of 230 miles (370 kilometers) per charge.
German Economy Minister Peter Altmaier called the announcement a "glorious success" for the country's attractiveness to the auto industry, especially in the race to develop and produce electric cars and batteries.
Altmaier said there had been competition for the plant among European countries in recent months, but denied that the government had offered any financial support to Tesla.
"So far, subsidies haven't been discussed," he told reporters in Berlin. "It's clear that Tesla will be treated the same way as all other automobile companies if it invests in Germany and creates jobs here."
In an interview with British publication Auto Express, Musk said uncertainty over Britain's planned exit from the European Union - and thereby the world's biggest trading bloc - had been a factor in not building the new plant there.
"Brexit made it too risky to put a Gigafactory in the UK," Musk was quoted as saying.
Tesla did not respond to requests to elaborate on how Brexit helped swing it for Berlin, but German government spokesman Steffen Seibert told reporters that "we see in it proof of trust in Germany as a location for innovation."
Tesla's announcement comes just a week after German officials and auto industry leaders agreed to increase by half the existing government incentives for electric vehicles with a list price of up to 40,000 euros ($44,500) - an incentive Tesla can expect to profit from indirectly.
The subsidy will also be extended from the end of 2020 currently to the end of 2025, and the government and industry agreed to aim for 50,000 publicly accessible charging stations nationwide by 2022.
Musk said that the plan is for the factory to be built near Berlin's new airport, which is located just outside the city limits in neighboring Brandenburg state and currently slated to open next year after years of delays.
"We definitely need to move faster than the airport, that's for sure," Musk said.
Germany, home to some of the world's biggest automakers, has been overtaken by the United States, China and some European neighbors in the adoption of electric vehicles.
In July, Tesla announced plans to build its third Gigafactory - the first outside the U.S. - in Shanghai.
German automaker Volkswagen, which last week began mass production of its ID.3 electric car, welcomed rival Tesla's decision to build the factory on its home turf.
"I'm happy that Elon is, let's say, pulling us, but I think the German industry is really now strongly investing," said Volkswagen CEO Herbert Diess, speaking alongside Musk at Tuesday's event. "And we will keep you alert."
Auto industry expert Ferdinand Dudenhoeffer said additional competition could benefit German automakers.
"This is good news for VW, Daimler and BMW," said Dudenhoeffer, who heads the Center Automotive Research.
Frank Jordans and David Rising contributed to this story.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.