David Goodhart is the author of The Road to Somewhere: the new tribes shaping British politics. He is head of the Demography unit at the think tank Policy Exchange.

As rich European countries have become more open and fluid since the end of the Cold War it has exacerbated the conflict between liberals and conservatives or, in my language, between the educated, mobile, “Anywheres” and more rooted, protection-conscious “Somewheres.”

Some countries are absorbing these conflicts better than others. And there is one place, in particular, that continues to flourish in the era of polarisation — the southern German state of Bavaria.

It is one of the richest and most economically dynamic corners of Europe but is also famous for its conservative politics and Catholic traditionalism and sense of place — even the co-leader of the Bavarian Greens, Katharina Schulze, wore a traditional dirndl dress when canvassing in last year’s state election.

The German lands of Europe have traditionally come under the sway of either Berlin or Vienna, and Bavaria is in some ways culturally closer to Vienna. Bavaria fought on the side of Napoleon in the early 19th century, was one of the least pro-Nazi states, and its exceptionalism is underlined by the fact that it never signed the German “basic law” constitution in 1949.

Historically it was a largely agricultural state with no significant natural resources; Germany’s pre-1945 industrial powerhouses were the Ruhr region in the west and Silesia in Prussia.

But after the Second World War this all changed dramatically and Bavaria was one of the principle beneficiaries. Following Germany’s defeat, Prussia, one of the most successful and significant states in modern European history, was wiped off the map and the Prussians were, in effect, ethnically cleansed. Many of them ended up in Bavaria.

If only we could be more like Bavaria By James Hawes

It is one of the best kept secrets of post-war German history that Bavaria’s economic take-off after 1945 was partly driven by emigrant Prussians and Sudeten Germans from Czechoslovakia. Millions found refuge in US-controlled Bavaria and some of the biggest names in German industry — such as Siemens, Allianz, Osram and Agfa — moved their headquarters from Berlin to Munich.

Bavaria has its own conservative party, the Christian Social Union, which is autonomous from, but in permanent alliance with, the main German centre-right party, the Christian Democrats. From 1961 to 1988 the CSU was led by the pugnacious but economically pragmatic Franz-Joseph Strauss who helped to establish Bavaria as the economic success story it is today in cars, defence and aerospace, electronics and most recently in the new digital industries.

The region has one of the best education and vocational training systems in Germany, not just for the cognitive elites but for competent middling performers too. It also boasts a network of top universities and research institutes, including the headquarters of the Max Planck institute which also moved to Munich after 1945 changing its name from the Kaiser Wilhelm Society. Former federal President Roman Herzog coined the phrase “laptops and lederhosen” to describe the state’s unusual blend of innovation and tradition.

The CSU has run Bavaria throughout the post-war period and although it has adapted with the times it remains considerably more conservative than the CDU. CSU leaders were vehemently opposed to Angela Merkel’s refugee policy and almost brought down Germany’s coalition government over it. Viktor Orban is a frequent visitor to Bavaria and his Hungarian Fidesz party was for many years protected by the CSU from being expelled from the main centre-right grouping of European political parties, the EPP. More recently CSU members outraged liberal opinion in Germany by opposing a leadership proposal for quotas for women in the party.

If only we could be more like Bavaria By Peter Franklin

The CSU is probably the last remaining true “Volkspartei” in Germany with a solid representation in all social classes, including the working class.

Bavaria also has a powerful left-liberal tradition in the big cities, which are mainly run by the Social Democrats and/or Greens. The Suddeutsche Zeitung, based in Munich, is Germany’s most influential liberal daily and has a lighter touch than its northern rivals. Munich is an open city with a distinctively southern variation on German-ness.

But a strong sense of belonging to Bavaria can accommodate both the traditionalist small farmer 100 miles outside Munich and a young, liberally-minded, digital entrepreneur in the state capital. The two-week Oktoberfest beer festival at the end of September every year is a celebration of Bavarian traditions that attracts around 6m foreign tourists and somehow manages to make historic peasant costumes seem cool.

Can this happy co-existence of Anywheres and Somewheres last? I was making the case for “model Bavaria” to a Social Democrat politician in Berlin a few months ago who, not surprisingly, did not like the idea. Moreover, he claimed that Bavaria is becoming a victim of its own success. By attracting so many people from all over Germany the distinctive Bavarian brand is being diluted. Soon, he said, it will be a German state like any other.

Other Germans, some of them migrants to Bavaria, say that is to miss the point — newcomers like, and want to preserve, Bavarian-ness. And, as its post-war history shows, this powerfully rooted place has been able to absorb millions from outside.

If only we could be more like Bavaria By David Goodhart

This was true before the war too; Ludwig Erhard, one of the shapers of Germany’s post-war economic miracle, came from the Protestant community of the wine region of northern Bavaria which also once had a flourishing Jewish community, Henry Kissinger and my own distant relatives the Lehman banking family were products of it.

Although CSU politicians take a hard line in general against mass immigration, they took a disproportionate number of refugees after the 2015 surge. Bavaria is likely to make a greater success of the influx than most other states thanks to the most efficient administration in the whole of Germany and the most no-nonsense police force.

It is too early to say how the integration process is going but it is generally easier for outsiders to integrate into a place that has a strong sense of itself, as, in the UK context, Scotland has shown in recent decades. Bavaria has a strong but open indigenious culture, anyone can wear lederhosen, and perhaps illustrates how a clear Leitkultur (dominant culture) rather than something to be ashamed of can help to foster integration.

Bavarians also tend to have strong sub-Bavarian local and regional connections and a healthy relationship to the bigger national entity. They say: “Because I am Bavarian I am German.” By contrast, a Scot is more likely to say: “I’m a Scot, hence British but certainly not English.” And many Catalans would say: “I’m Catalan, hence not Spanish.”

Bavaria is not, of course, completely untouched by the winds of polarisation, and the hard-right AFD polled 10% in last year’s state election, reducing the CSU vote share to 37%, its lowest figure ever. But conservative Bavarian politics has now also thrown up a new big beast — Marcus Söder — who seems capable of pushing the CSU back up over 40% and is now being whispered about as a possible successor to Angela Merkel in Berlin.

If only some of that Bavarian magic could be sprinkled over the whole of Germany and, indeed, the rest of Europe.