BERLIN — Elon Musk said on Tuesday night that Tesla, the electric carmaker, would open a new plant near the German capital that would make batteries, powertrains and vehicles, starting the with the company’s newest model, a compact sport utility vehicle called the Model Y.
Mr. Musk made the announcement on a Berlin stage after being awarded the “Golden Steering Wheel,” a German automobile prize, for the Tesla Model 3.
“I actually have an announcement, that I think will hopefully be well received,” he said, with leaders of Germany’s automobile industry in the audience. “We’ve decided to put the Tesla Gigafactory Europe in the Berlin area.”
He provided few details about the plant, which would be Tesla’s first major factory in Europe, including when and where exactly it would be built or how many people would be hired.
Germany, Europe’s biggest economy, is quickly becoming the European battleground for building electric vehicles, as both the German government and manufacturers invest in the new technology. Mr. Musk had mentioned that Tesla would build a factory somewhere in Europe during the company’s last earnings report conference call in October.
Peter Altmaier, the country’s economy and energy minister, described Tesla’s announcement as a confirmation of the federal government’s investment in the field of electric mobility.
“We can assume that we now have the chance to become an important international center in this arena of the future over the next few years,” he said at a news conference Wednesday morning.
The government recently announced plans to subsidize the purchase of electric vehicles by as much as $5,500, in a bid to bring 10 million electric cars onto German roads by 2030. The government plans to support those with 300,000 publicly accessible charging stations.
Herbert Diess, the chief executive of Volkswagen, joined Mr. Musk onstage on Tuesday shortly after he made the announcement. Mr. Diess congratulated him on his award, noting that there was a lot of competition in Germany.
“I thank you for pioneering, for pulling us, for pushing us,” he told Mr. Musk.
Volkswagen in particular is undergoing a major strategic shift toward electric cars. Mr. Musk’s announcement heralds a direct competitor just 150 miles east of VW’s Wolfsburg headquarters.
After the surprise statement, Mr. Musk sent a Twitter message to his nearly 39 million followers with the words “GIGA BERLIN” and hearts in the colors of the German flag.
“I come to Berlin a lot,” Mr. Musk told the crowd. “Berlin rocks!”
Local clean energy advocates cheered the news.
“This move will give huge impetus to e-mobility and the much-needed shift in mobility in Berlin and Germany,” said Ramona Pop, a member of the Green Party and the Berlin lawmaker responsible for economics, energy and public enterprises.
Mr. Musk told a British car magazine that Britain’s looming exit from the European Union helped him decide on Germany.
“Brexit made it too risky to put a Gigafactory in the U.K.,” he told Auto Express.
Although Tesla would not give details about the proposed factory, it did say that the new factory would be powered by wind and solar energy, with a goal to be emissions free.
The new plant would be Tesla’s first major production center in Europe. The company runs a smaller assembly plant in the Netherlands and facilities in a number of other European countries.
Europe is proving to be a fertile market for the company.
Following its introduction in March, the Tesla Model 3 quickly became the best-selling battery-powered car on the Continent. And in September, the Model 3 narrowly missed being listed among Europe’s top 10 passenger cars in sales. Tesla sold 17,500 Model 3s that month, according to data compiled by JATO Dynamics, just behind the Renault Captur, a compact S.U.V. with an internal combustion engine. The Model 3 sold better than established vehicles like the Volkswagen Tiguan SUV and BMW Mini.
Jack Ewing contributed reporting.