BERLIN — European officials have argued the imperative of the EU’s refugee deal with Turkey to a skeptical public for weeks, insisting there was simply no viable alternative to the controversial pact.

“Those who criticize the agreement have never presented an alternative we could work with,” Commission Vice President Frans Timmermans recently told the European Parliament.

As Turkish President Recep Tayyip Erdoğan has hinted in recent days he may just let the whole arrangement collapse, a step that could again send refugees streaming across the Aegean, Europe has quietly begun preparing a Plan B.

The EU’s contingency plan, described by senior diplomats, envisions turning Greece into what European leaders from Angela Merkel on down have vowed to avoid: a giant refugee camp.

Indeed, the whole rationale for the Turkey pact was to keep refugees from being stranded in Greece, which has neither the wherewithal nor the capacity to deal with an influx that could quickly reach the hundreds of thousands.

But with most of the rest of Europe refusing to accept more than a token number of migrants, there may not be another option.

Under the blueprint, first reported Monday by Germany’s Bild, Greek islands would serve not just as reception centers for the refugees, but as semi-permanent refugee camps, much like those that have been built near the Syrian border in Jordan and Lebanon.

The EU has yet to make any concrete preparations and appears to be pursuing the idea, at least in part, to show Erdoğan that it has other options, however unattractive they may be.

The discussion follows Erdoğan’s refusal last week to revise Turkey’s anti-terror law, which critics say his government uses to target journalists and other critics of his increasingly authoritarian rule.

Europe has made overhauling the law one of the key conditions for granting Turkish citizens visa-free travel in the EU. Backing down from that insistence in the face of growing opposition to the pact would be difficult.

Under the deal sealed in March, Turkey agreed to prevent migrants from crossing the Aegean and to take back those who do in exchange for aid and the visa waiver, a coveted perk for Turks with business and family ties in Europe.

Turkey seemed well on its way to gaining the privilege after the Commission offered its recommendation last week. Then on Friday, just hours after ousting Turkey’s pro-European prime minister, Erdoğan signaled he would not heed Europe’s demand.

“The EU says ‘you will change the anti-terror law for visa,'” Erdoğan said during a speech in Istanbul. “Pardon me but we are going our way and you can go yours.”

'Cruel' Europe

On Sunday, the Turkish leader poured more oil on the fire, accusing European countries of “cruelty” for closing their borders to refugees.

On Monday, he struck a more conciliatory tone, saying Turkey still wanted the visa deal and that he would cooperate with the EU.

The mixed signals and the political upheaval in Ankara have European leaders worried the deal will collapse. Even without Erdoğan’s taunts, winning support for the agreement in Europe has proved difficult, especially in the European Parliament, which must grant its approval for the deal to go forward.

Politicians on the left and right have banded together to oppose the pact, citing concerns over Erdoğan’s attacks on freedom of expression and harsh treatment of the Kurds.

The debate has left the plan’s sponsors, including Merkel and European Council President Donald Tusk, in a difficult position. To sell the agreement in Europe, they’ve presented it as the EU’s only realistic option to bring the crisis under control. But that argument also strengthens Erdoğan’s hand, emboldening him to demand further concessions.

For all his bluster, the Turkish leader needs Europe’s help in dealing with the nearly 3 million Syrian refugees now in Turkey.

By floating the idea of establishing camps in Greece, European officials want to signal to Erdoğan that they aren’t as dependent on his cooperation as he may think and they won’t be coerced.

It’s doubtful he’ll be convinced.

Even if the EU were to grant Greece significant financial and logistical assistance to deal with the crisis, a massive influx of refugees to the country would likely further destablize its already fragile political system. The EU, which already oversees much of Greece’s public administration and is in the process of overhauling its asylum system, would have to devote even more resources to the country.

Nonetheless, the EU can rely on more than idle threats in dealing with Erdoğan. For all his bluster, the Turkish leader needs Europe’s help in dealing with the nearly 3 million Syrian refugees now in Turkey. Europe has promised about €6 billion in financial aid and would likely pony up more once that’s exhausted.

What’s more, the promised visa liberalization is extremely popular in Turkey. For the millions of Turks with relatives in Germany and other European countries, going through the cumbersome process of applying for a visa would be a thing of the past.

More important, the visa waiver, which has been promised to Turks for years, would send a powerful signal that they are welcome in the West.

If the deal falls through, Erdoğan will likely blame Europe. He may find it difficult, however, to convince his people the Europeans are the only ones at fault.