The confrontation marked a low point in relations between two neighbors who have long had a fragile coexistence within NATO, and it threatened to upend a fine balance in the strategically important, energy-rich southeastern Mediterranean.

It also brought front and center the European Union’s dependence on Turkey to limit the movement of migrants toward its territory, as well as Mr. Erdogan’s willingness to weaponize migrants for his own purposes.

But experts said Mr. Erdogan’s mobilization of migrants and security forces at the borders with Europe could have backfired, being so provocative that it may have made European politicians less willing to make concessions.

“The problem is that because of the blackmail used by Turkey, getting an agreement from the European Council is going to be more difficult,” said Mr. Pierini, who is now an analyst for Carnegie Europe, a research organization.

The European Union in 2016 agreed to funnel 6 billion euros to organizations helping the nearly four million Syrian refugees in Turkey, in exchange for Turkey’s help in securing its borders with Greece.

That deal came after nearly one million refugees left Turkey for Greece, allowing them to reach the Continent’s prosperous north relatively easily.

But Turkey has complained that European funding has been slow in coming, and has been paid to aid groups as well as into its own government coffers, making it less efficient. At a meeting in Brussels this week, European Union leaders discussed with Mr. Erdogan whether the agreement would be extended and how to restore it.