Haste for migrant deal shows Merkel under strain
In politics you can sometimes gauge the level of panic and fear by the speed with which previously held principles are set aside.
So with the migrant crisis.
Some open borders have been suspended, governments are contemplating talking to Syria's President Bashar al-Assad, long denounced as a brutal dictator, and a deal is being hastily concluded with Turkey, widely held to be an increasingly authoritarian country.
And then what is being debated in Germany - containment camps on its borders and a police union chief urging Germany to build a fence along its border with Austria - are all indicators of the political tension gripping Berlin.
Angela Merkel has called her decision to open Germany's borders to refugees a "historic challenge" - but she is no longer in charge of events.
Her increasingly restive party is muttering she is "without a plan".
So the overture to Turkey - it is born out of the failure of other policies.
Germany had put great store by burden-sharing, by getting other countries to accept quotas.
It was muscled through a meeting of EU interior ministers against the wishes of several countries.
But only a handful of refugees have been relocated. Many others are refusing to leave Germany.
It is the case that many of those seeking asylum in Germany are from Kosovo and Albania.
Both countries are considered safe and the government in Berlin wants people returned there as quickly as possible.
It did not take long for the migrants to get medical certificates which prevent them being deported.
So Turkey came to be seen as the key to managing the crisis.
The EU wants Turkey to slow the numbers crossing the Aegean.
It also wants Turkey to take back any migrants who are refused asylum and entry into the EU.
Key Turkish election
Even though Turkey is only a couple of weeks away from a sensitive election, Angela Merkel has hurried to Ankara to meet the president and prime minister.
The President of the European Council, Donald Tusk, was clear: "an agreement with Turkey makes sense only if it contains the flows of refugees".
The Turks are in no hurry to conclude a deal.
They understand events have handed them powerful cards.
They also have a sense of grievance.
They have hosted two million Syrian refugees and feel that "the EU was not a partner".
"Unfortunately, Turkey was left alone by the international community," said Prime Minister Ahmet Davutoglu.
Turkish President Recep Tayyip Erdogan said: "We've spent $8bn until now. How much did the West give?"
The answer was a few hundred million dollars.
So the Turkish government wants funding - perhaps 3bn euros (£2.2bn; $3.4bn) or more.
It wants a lifting of visa restrictions inside the open borders of the Schengen area.
It wants to see its application to join the EU "fast-tracked".
The EU has indicated that it is prepared to support opening Chapter 17 of the accession process which deals with economic and monetary affairs.
Turkey was accepted as a formal candidate to join the EU in 1999.
It was a slow process. Not all of Europe's leaders wanted Turkey in the union.
Former French President Nicholas Sarkozy said: "The EU is primarily for the European continent. To my knowledge, our Turkish friends - a great power, a great nation - are mainly in Asia Minor."
Only recently the German chancellor said: "I still have hesitations over Turkey's full membership."
The hesitations were not just about the impact of having such a large country join the union.
Can deeds match words?: The challenges ahead for the EU and Turkey
The pull of Europe: Five migrant stories
Merkel under pressure: Chancellor's migrant policy faces criticism at home
Focus on Turkey: Why the EU views Syria's northern neighbour as key
Crisis in graphics: Migration numbers explained
There were increasing concerns about the authoritarian leadership of Erdogan, the leader of the AKP, an Islamist party.
The media is not free. Journalists are frequently under pressure of arrest. Some reporters have been jailed.
Papers and TV networks have been restricted in reporting the investigation into the recent Ankara bombings.
The courts are not always impartial and the rights of the Kurdish minority are under threat.
Many members of the European Parliament believe their concerns about basic human rights have not been addressed and are now being set aside.
The fact that Angela Merkel was prepared to shake the hand of the Turkish president in the midst of a controversial election campaign is a sign of Europe's desperation.
Earlier in the year Mr Erdogan's party had lost its majority after 13 years in power.
Attempts at forming a coalition failed and the president has called fresh elections.
His opponents accuse him of using a bomb attack to launch raids against the Kurds and so widen political divisions.
In just five weeks from the beginning of September, Germany accepted some 409,000 arrivals.
The states and local councils are at breaking point and Angela Merkel is facing fierce criticism from within her own party.
To relieve that pressure back home she has turned to Turkey but at a cost.
The publication of the EU's annual progress report on Turkey's EU membership, which almost certainly contains criticism of the Turkish leadership, has now suddenly been delayed - probably until after the Turkish election.
Compromises unimaginable just weeks ago are now being embraced.
Berlin is hoping that the onset of winter will slow the arrival of refugees for several months.
It is a race against time. The German government needs a breathing space.
Angela Merkel says it is "the most difficult task I've experienced in my Chancellorship".
It will, without doubt, define her legacy.