There are two Germanys. One is familiar to Britain: the efficient, sober place where they make the cars and the dishwashers. We like to think that, like us, the Germans exhibit a no-nonsense pragmatism born of a seafaring past. For centuries the Hanseatic League had trading posts in London, on the site today occupied by Cannon Street Station, and in towns all along eastern England. Back then the merchants from Hamburg and Lübeck sold amber, furs and timber. Today they shift BMWs and Mieles. This is the Germany with which Britain can do business. The Germany that needs us and has our back.

Yet there is another Germany, poorly understood in Britain. If the first is the “Germany of seas”, call this the “Germany of rivers”. It is a romantic land of dense, misty forests and dark past traumas. It is grandly continental, bleeding into the countries on its borders. Where the departure boards of London stations list provincial cities and ports, that of Berlin Hauptbahnhof is a roll-call of capitals, a litany of interdependence: Amsterdam, Copenhagen, Minsk, Moscow, Paris, Prague, Vienna, Warsaw. This is the Germany where many families have collective memories of oppression and flight, where grandparents know the fear of the 3am rap at the door, where herds of deer refrain from crossing once-fenced-off borders out of sheer habit. A Germany for which “Europe” is about more than trade.

The two Germanys are often in tension. The 19th-century novelist Theodor Fontane ironised the clash between the sanguine Hanseats and melancholic Prussians. Thomas Mann was born into the anglophile bourgeoisie of Lübeck but felt an intense pull from the hinterland: from the plains and

mountains to the south, and the Slavic and Latin lands beyond. His books are populated by men similarly torn between the upstanding coast and the wild, artistic continent: Hans Castorp in The Magic Mountain, Gustav von Aschenbach in Death in Venice.

This split has shaped the Anglo-German relationship. Twice in the first half of the 20th century the British establishment wrongly concluded that war with Germany was impossible through overestimating the similarities of temperament and interest. In the postwar years relations turned partly on which Germany marked the sitting chancellor more. They improved under Ludwig ­Erhard and Helmut Schmidt, both Germany-of-seas types; muddled along under Willy Brandt and Gerhard Schröder, somewhere in the middle; and struggled under Konrad Adenauer and Helmut Kohl, paid-up Germany-of-rivers chancellors.

Charles Powell, Margaret Thatcher’s foreign policy guru, tells a revealing anecdote. Kohl invited the prime minister to visit the Rhineland, eat Saumagen (pig’s stomach) and visit the tombs of Holy Roman emperors at Speyer Cathedral. In the crypt, the chancellor pulled Powell aside: “Now she’s seen me here in my home town, right at the heart of Europe and on the border with France, surely she will understand that I am not just

German, I am European.” On her return flight, Thatcher kicked off her shoes and declared: “My God, that man is so German.”

Angela Merkel bears traces of both sides. The chancellor has Hanseatic family roots, in Danzig and Hamburg. She is not as sentimentally European as her centre-left challenger Martin Schulz or her chief of staff, Peter Altmaier. She thinks that national governments, not the European Commission, should call the shots in the EU. She even loves Midsomer Murders. Yet she also embodies the Germany of rivers. Merkel grew up behind the Iron Curtain and bridles at fences and walls; she is said to have watched the footage of refugees arriving at Munich

Station in 2015 with tears in her eyes. “She’s stuffed, she’ll be gone in months,” an aide to David Cameron told me that summer, demonstrating how poorly Downing Street understood her and Germany.

Cameron’s renegotiation further illustrated the point. He misheard Merkel’s talk of reforming the EU as a promise of special treatment for Britain. He did not realise that, as the former ambassador to Germany Paul Lever puts it, “sensitivity to immigration does not, in Germany, mean calling into question the right to free movement”. In other words he saw only the Germany of seas, and not the Germany of rivers.

In the past, the relationship with the Insel­affen (“island apes”) has divided the two Germanys. The European idealist in Merkel may have despaired over Cameron, but until 23 June 2016 she also saw him as a useful, liberal counterweight to France. Reaction to Macron’s win is similarly conflicted: romantic Germany welcomes his Euro flag-wavery, as sceptical Germany bridles at his talk of reshaping the eurozone. But Brexit is different. It has aligned the two sides to an extent poorly understood in London.

The Germany of rivers is straightforwardly for a clean Brexit. This is the Germany that humiliated Theresa May by publishing a withering account of her Downing Street dinner with Jean-Claude Juncker. And although the other Germany, the Germany of seas, mourns Britain’s flounce and the subsequent southward shift in the EU’s balance of power, it essentially agrees. Where German pragmatism and prosperity were once best served by a closer relationship with London, now they depend on the cohesion of the single market. And that means making Britain pay, to show there is no deal better than membership.

There is a new consensus abroad in Germany: that the country’s destiny lies with France and other Continental powers, that its European vocation needs defending, and that the wheeling-dealing British have lost their pragmatic mojo. And, just perhaps, that the Inselaffen were less rational than Germans thought all along.

Jeremy Cliffe is the Berlin bureau chief of the Economist