GRÜNHEIDE, Germany — The visitors from Palo Alto, Calif., were shown how Berlin, a hive of tech start-ups that likens itself to Silicon Valley, is just a short commute away.

They were promised building permits in four weeks rather than the customary 11 months.

And they were taken aloft in a 44-year-old Russian biplane for a leisurely tour of the site.

And it worked. Elon Musk, the chief executive of Tesla, decided to build the carmaker’s first major European factory in Grünheide, a village just outside Berlin and surrounded by undeveloped tracts.

Mr. Musk made the announcement during seemingly impromptu remarks at an automotive awards ceremony in Berlin last week.