Shopping in a Turkish bazaar is never wise for the novice.

The EU learned that lesson the hard way when it discovered the carefully crafted refugee deal it believed it had sold to Turkish leaders in the run-up to Monday’s summit turned out to be little more than the beginning of the negotiation.

Turkey made Europe a counter offer early Monday that six months ago would have prompted EU negotiators to get up and walk out. To European eyes, the proposal Ankara put on the table read more like a ransom note: €3 billion in refugee aid in addition to the €3 billion already pledged, full-scale visa liberalization for Turkish citizens in the EU by June, an acceleration of Turkey’s application to join the bloc as well as a pledge to resettle many of the Syrian refugees Turkey takes in.

Turkey’s message to Europe was clear: You need us more than we need you.

That Europe is not just considering the Turkish proposal, but is likely to end up accepting most, if not all of it, is testament to the desperation of the Union and its largest member, Germany, to secure a deal to limit the flow of refugees and end a crisis that is testing EU solidarity like nothing in its history.

Angela Merkel, who sees a sweeping agreement with Turkey as the only viable way out of the quagmire, tried into the early hours of Tuesday to cajole her fellow leaders into accepting the framework. In the end, they agreed to delay a decision until the next regular EU summit, scheduled for next week.

What worried some in the room is that accepting the Turkish terms would set a dangerous precedent, signaling that the bloc’s core democratic principles are up for sale. Giving Ankara what it wants, just as President Recep Tayyip Erdoğan has been tightening his grip on power, turning Turkey into what many consider a dictatorship, could do irreparable harm to the EU’s credibility, critics argue.

And yet for Europe, the likely alternative — the collapse of Europe’s open borders and public trust in its institutions — would be even worse.

Speaking after the summit, Merkel stressed that given the war in Syria and the “geostrategic” situation, a deal with Turkey is “absolutely in Europe’s interest.”

Convincing the rest of Europe won’t be easy.

Cooperation, not sanctions

It was only on Friday that Turkish authorities seized control of the country’s largest newspaper, Zaman, dispersing protestors with tear gas. Such an action would normally prompt censure from Brussels.

Europe’s dry official commentary at the end of the summit: “The EU heads of state or government also discussed with the Turkish prime minister the situation of the media in Turkey.”

Instead of weighing sanctions, the EU is considering accelerating Turkey’s negotiations for EU membership. That process, which has been stalled for years, normally requires a candidate country meet basic standards on everything from the independence of its judiciary to press freedom. Acceding to Turkey’s demand that the EU open talks in five key areas linked to its membership bid would force the Union to ignore Turkey’s record on human rights, intimidation of the media and manipulation of the judiciary.

“We certainly can do all of that. The only question is what it will do to the EU,” one official involved in the deliberations said.

The irony is that Erdoğan likely has little intention of joining the EU. Membership in the EU is simply not compatible with his strongman style. But by forcing European countries to invite Turkey back to the table, he can show his people that Turkey is still accepted by the West and slap down domestic critics who say otherwise. Winning visa-free travel to Europe would offer further affirmation of Turkey’s place in the first world.

European officials tried to sell the summit as a success, arguing that the commitments Turkey was willing to make in terms of taking back refugees and helping to shut down human smuggling would amount to a major “breakthrough.”

"This is a real game-changer,” European Commission President Jean-Claude Juncker said afterwards. “We will make clear that the only viable way to come to Europe is through legal channels.”

In some respects, Turkey’s new offer goes further than the original plan it had discussed with the EU, particularly concerning the numbers of refugees Ankara would take back and the measures it would adopt to deter human smuggling.

But the price is higher than anyone in Brussels thought they’d have to pay.

Best laid plans

Just last week, a parade of European officials, led by Council President Donald Tusk, visited Turkey to lay the groundwork for a deal.

Under his blueprint, Turkey would have agreed to take back refugees intercepted in the Aegean, including Syrians, as well as some of the refugees now stranded in Greece. In return, the EU would release more of the €3 billion in aid it pledged last fall to help Turkey take care of the refugees.

Berlin believed that the deal, combined with other recent measures, such as a beefing up of coast guard patrols and the involvement of NATO ships in the effort, would help choke the flow of refugees.

Tusk’s entourage was encouraged by the progress they made. After months of foot dragging on the so-called EU-Turkey Action Plan, the Turks were finally moving forward.

The Europeans concluded Erdoğan had come around because he needed EU support in his confrontation with Russia and in dealing with the broader security challenges Turkey faces in the Middle East.

“For the first time since the beginning of the migration crisis, I can see a European consensus emerging,” Tusk tweeted after meeting Erdogan, the final stop in a weeklong tour of the Balkans.

The first sign the EU’s read on Turkey was off the mark came just minutes after Tusk’s plane departed Istanbul. Late Friday, a Turkish court approved the government’s seizure of the Zaman newspaper. Shortly thereafter, riot police moved in.

Caught off guard, Europe’s leaders said little about the crackdown for the next 48 hours, beyond the usual boilerplate about the importance of a free press.

Behind the scenes, officials worried that any criticism of Erdoğan could derail the deal ahead of Monday’s summit. They suspected the move against Zaman was a provocation meant to show Europe who was in control.

What the Europeans didn’t know was that the deal they thought they had was already dead.

A surprise at dinner

Turkish Prime Minister Ahmet Davutoğlu invited Merkel for dinner at the Turkish embassy in Brussels Sunday evening. Dutch Prime Minister Mark Rutte, whose country holds the rotating EU presidency, also attended.

The dinner was set to prepare for the next day’s summit. But instead of ironing out the details of what had been negotiated over the previous weeks, Davutoğlu dropped a bombshell.

Turkey, he told them, had a new set of demands. Over the next several hours, the three discussed Ankara’s new conditions.

Merkel quickly realized it would be impossible to reach a deal at Monday’s summit, given the scope of the deal Davutoğlu had put on the table.

On Monday morning, Merkel arrived early to the Council headquarters to meet with other leaders. The focus turned to damage control.

The schedule called for lunch with Turkey followed by a meeting of the EU-28 to work out the final details of an agreement. The Turkish move threw the summit into disarray. The meeting with the Turks lasted for hours. Dinner was announced only to be canceled so leaders could hammer out a mealy-mouthed statement. The highlight: "We need to break the link between getting in a boat and getting settlement in Europe."

Merkel, who faces a string of important regional elections in Germany on Sunday, had hoped to leave Brussels with a solid deal she could present to an electorate increasingly skeptical of her government’s handling of the crisis.

Instead, all she can offer them is a vague promise that a comprehensive agreement with Turkey is near.

Other EU leaders, meanwhile, were shocked. Tusk complained that all his efforts over the past week had been for nothing.

Some national delegations blamed the Germans for bungling the negotiations with Turkey by allowing Davutoğlu the opportunity to recut the deal.

Merkel was at pains after the summit to put a positive spin on the day’s events.

“This Turkish proposal is a breakthrough if realized,” she insisted.

"Yes, this has made things more difficult … But I honestly think its better to have such a proposal now than not at all.”