SYED SHAH, a young Pakistani asylum-seeker loitering outside a registration office in Berlin, has a theory about Angela Merkel. He isn’t entirely sure who she is. But, he notes, “Great people have great leaders.” The Germans he has encountered since his arrival a week ago have been so welcoming and friendly that it stands to reason that their chancellor would share their qualities.

Perhaps he is right. Mrs Merkel’s response to the refugee crisis certainly seems to belie her popular image as a political weathervane who dares not step too far beyond public opinion. The chancellor has held firm as parts of Germany, including her conservative coalition, have wobbled under the strain of refugee numbers. Her new catchphrase, “We will manage!”, marries a faith in German efficiency with a rather un-Teutonic optimism.

What has come over the Iron Chancelloress? A recent edition of Der Spiegel, a German weekly, depicts Mrs Merkel as a twinkly-eyed nun and avers that on refugees, she is “driven more by her sentiment than she is willing to admit.” In truth, her approach is still hard-headed. Although Germany, like most European countries, was caught on the hop by the migrant surge, its policy has now crystallised into three elements: pragmatism at home; power politics within Europe; and realpolitik with Turkey. None is the stuff of the convent.

Germany will accept hundreds of thousands of Syrians this year, and more in the future. Mrs Merkel knows that few will leave; her can-do approach is therefore designed both to lift her compatriots’ weary spirits and to acknowledge that Germany has no choice but to manage this crisis as best it can. Her government has passed measures to help the newcomers integrate. As for her decision in August to waive Germany’s right to return Syrian asylum-seekers to their European country of entry, that changed little in practice: few Syrians had previously been turned away. What it did do was send a signal that encouraged lots more migrants, including non-Syrians, to head for Europe. Publicly, European officials applauded Mrs Merkel’s humanitarianism. Privately, they fumed at her recklessness. The view of Muhammad, a Syrian refugee who reached Berlin two months ago, is typical: people are heading to Germany because Mrs Merkel “opened the door”.

But because Germany will have to absorb them in large numbers, Mrs Merkel is determined that others share the burden. Her patience with countries she considers to be shirking has worn out. Last month Germany led the charge to impose a one-off plan to redistribute 120,000 asylum-seekers across the EU, despite bitter opposition from Hungary, Slovakia and the Czechs. Now Mrs Merkel is bracing for a fight over a permanent scheme to relocate migrants automatically when arrivals in a given country exceed a threshold. German officials have let it be known that countries that resist such efforts will meet a sceptical eye when they next try to win subsidies from the EU budget.

The rest of Mrs Merkel’s energies will be devoted to reducing the numbers inside Germany and stopping people from arriving in the first place. Germany has cut benefits for asylum-seekers and wants to speed up the return of those whose bids fail, partly by establishing “transit zones” near its borders to expedite their processing. Mr Shah, who fled clan fighting in his home town of Haripur, may struggle in this environment. Only 12% of Pakistani asylum bids in Germany this year have succeeded.

Perhaps Mrs Merkel’s boldest step is her overture to Turkey. Last weekend she visited Recep Tayyip Erdogan in Istanbul, promising to lavish the president with gifts if he would help stem the migrant flows. A few days earlier an EU delegation had drafted a plan with Turkey on matters like aid and visa rules. But it took a visit from Mrs Merkel to inject political energy into the deal. The chancellor also made explicit something Eurocrats could only hint at: Turkey’s co-operation on refugees might speed its bid to join the EU. Concerns over human rights and press freedom have been brushed aside with almost Kissingerian disdain.

All this is less a strategic vision than a piecemeal reaction. Grand ideas like a massive resettlement of refugees from Turkey and elsewhere directly to Europe are on hold (though some in the government have begun to think about it). First, the borders must be controlled and the burden within Europe shared.

First, Fortress Europe

Each of these policies represents a gamble. The relocation plan pushed by Germany may flop. Mr Erdogan is about as unreliable a partner as it gets. If he cannot or will not stick to his side of the deal, Mrs Merkel will find herself in grave difficulties at home. But the fact that Mrs Merkel’s policies are risky and often improvisational does not mean that they are not hard-headed.

The chancellor is, by instinct, a cautious, sober decision-maker. But she has been repeatedly plunged into situations where she has no choice but to make bold decisions and stick to them. Recall the euro-zone crisis of 2010-12. Mrs Merkel hemmed and hawed but held the euro together, making unpopular decisions when needed. Her gift is less for identifying public opinion’s limits than for knowing when she has no choice but to test them.

As a result, Europe’s most powerful politician seems destined to be shaped by events rather than to help shape them.The sight of Mrs Merkel currying favour with the autocratic Mr Erdogan two weeks before a crucial parliamentary election in Turkey was not particularly edifying. She could have visited months ago, when the migrant flows were already picking up. Instead she waited until her hand was forced by the tensions at home.

So Europe is stuck with a leader who will chance her way through crises. That her responses are improvised does not make them any less drastic, from a permanent bail-out fund to a rewrite of European asylum laws. Here, perhaps, is the Merkel paradox: that such a rational politician can be so hard to predict.