When Elon Musk tweeted last year that Germany was a front-runner for Tesla Inc.’s first European car factory, it sent politicians into a frenzy to win over the billionaire.

Berlin’s economy minister, Ramona Pop, responded with a two-page letter that waxed lyrical about Musk as a pioneer and visionary and offered financial sweeteners to attract him to a city bustling with a vibrant tech scene and a network of auto research institutes. She even floated access to a nearby race track where Tesla could take its cars for a spin.

Ramona Pop Photographe: Britta Pedersen/picture alliance via Getty Images

As the beauty contest gained momentum, it turned into a battle. Two federal states that border France also touted their virtues. Musk already had a connection with that part of Germany from his purchase of an automation company there a few years ago. There’s also Berlin’s patchy track record shouldering large infrastructure projects -- its new airport remains a mothballed mess, years behind schedule and massively over budget.

Yet when Musk’s Gulfstream jet touched down in the German capital early this week, his mind was made up: the European gigafactory would sit on the outskirts of Berlin, with an additional engineering and design center within the city limits. Musk casually dropped the news at a red-carpet award populated by the top brass of Germany’s car industry, including the CEOs of BMW AG and Volkswagen AG, two companies pushing hard into an electric future.

“There was very intense competition in recent months among different European nations,” Economy Minister Peter Altmaier told reporters on Wednesday in Berlin. “It’s an important and positive development that Germany was chosen.”

Mounting Pressure

Musk is taking his fight for the future of transport into the heartland of the combustion engine, where the established players long laughed off Tesla as an upstart on feeble financial footing that couldn’t compete with their rich engineering heritage. But Musk has captured the imagination of the think-different consumer, putting pressure on the Germans to respond. Volkswagen has pulled out all the stops, earmarking more than 30 billion euros ($33 billion) to develop the industry’s largest fleet of electric cars.

The choice of Berlin and its surrounding area hands Musk several advantages, not least free money in form of subsidies. There’s the proximity to a government keen to sponsor the industry’s transformation. Labor costs in eastern Germany are generally lower than in the traditional engineering hubs in the southern part of the country. And Berlin, where new startups are founded each day, is an attractive place to live for the tech workers Tesla would seek to attract for its design center.

Read more: Musk Invades Germany’s Automotive Heartland With New Factory

The area where Tesla plans to put the factory, called Gruenheide just east of Berlin in the state of Brandenburg, provides quick access via the Autobahn and a link to public transport. It’s a site that BMW had considered before choosing the city of Leipzig a few hours south for a new factory in 2001, the last time a car company built a major new facility in Germany.

Road signs sit in Freienbrink near the expected site of Tesla Inc.’s first European car factory. Photographer: Tobias Schwarz/AFP via Getty Images

Roller-Coaster

The government in Brandenburg, one of five federal states in the former communist east, also lobbied hard to win over Musk, offering at least 100 million euros in aid. The state’s negotiators kept up the pressure in the past months, touting Brandenburg’s proximity to Berlin, its skilled labor force and an abundance of clean-energy plants, Premier Dietmar Woidke said.

“Berlin can do a lot that we aren’t able to, and we can do a lot that Berlin can’t,” Woidke told reporters in Potsdam. “Together, that’s an unbeatable mix.”

Officials in Brandenburg described the negotiations with Musk as an emotional roller-coaster ride, with the politicians struggling to read the billionaire’s intentions. But by last week, things were looking up. After Musk arrived in Berlin, he toured the location where the factory would sit, and he took a local train back to central Berlin to try for himself how long the commute might take.

Fresh from his experience building a factory in China, Musk had a demand that was as clear as it was hard to execute for notoriously bureaucratic Germans: to build the site as swiftly as the one in Shanghai, according to Brandenburg’s economy minister, Joerg Steinbach. That caused considerable consternation among officials still chafing from the new-airport debacle.

Shanghai Factory

Tesla long relied on a single assembly plant, based in Fremont, California, for its car production. The company is on the verge of starting sales of Model 3s produced at its latest facility, near Shanghai, which it erected in record time. Musk estimated earlier this year that Tesla’s European gigafactory probably won’t be operational until 2021.

Elon Musk in Berlin on Nov. 12. Photographer: Tobias Schwarz/AFP via Getty Images

The factory will make batteries, powertrains and vehicles, beginning with the Model Y crossover unveiled earlier this year, he said in a tweet. It’s also expected to churn out the Model 3, which beat out BMW and Audi for the award Tuesday night.

With Tesla adding as many as 10,000 jobs to Berlin and the region, according to Bild, it’s also a boon for the German capital and its burgeoning tech scene. Famously labeled “poor but sexy” by a former Berlin mayor, the city has thrived in recent years thanks to a steady influx of young entrepreneurs and IT professionals attracted by the capital’s mix of affordable housing (the city just announced a rent freeze), top-notch universities, and homegrown tech successes including fashion retailer Zalando SE and food delivery startup Delivery Hero SE.

In the last five years, Berlin’s population has grown by almost 50,000 annually, underscoring its attraction that can’t be matched by cities like Stuttgart, home to Daimler AG and Porsche, or Wolfsburg, where Volkswagen is based. As a sweetener, the Berlin government offered locations including the site of the existing Tegel airport for Tesla’s design center.

Tech Hubs

The appeal of Berlin hasn’t been lost on Musk’s rivals. Virtually all the major German carmakers have created tech hubs, and dozens of local startups are active in fields including artificial intelligence, 3D printing and autonomous driving. Tesla will have to compete for local talent with U.S. tech giants including Apple Inc., Oracle Corp., Google and Amazon.com Inc., which is preparing to move into Berlin’s highest office building by 2023 in the rugged-yet-fashionable Friedrichshain-Kreuzberg district.

“The Berlin location, home to an ever growing co-working, digitally focused, young programming demographic, has already proved why many German OEMs such as Volkswagen, Porsche, BMW and Daimler are opening digital offices on the Spree” river, said Matthias Schmidt, an independent automotive analyst in Berlin.

All the jubilation notwithstanding, Berlin and Brandenburg have their work cut out to build a new home for Tesla. The region lost most of its heavy industry during World War II, and much of what remained after the war was ground up by the country’s separation. Siemens AG is the only global company with a sizable manufacturing footprint in Berlin.

And the sprawling new airport, still under construction, is a massive blemish on the region’s record of getting big projects off the ground. It’s an ignominy that was on the U.S. billionaire’s mind when he followed his announcement with an appeal to get the job done.

“We definitely need to move faster than the airport,” Musk said.

— With assistance by Iain Rogers, Oliver Sachgau, Christoph Rauwald, and Chris Reiter