ISTANBUL—Turkey lost its biggest champion in the European Union as Britain voted to exit the bloc, leaving Ankara without a powerful sponsor in its moribund quest to join the EU and posing risks to the migration deal that helped curb Europe’s refugee crisis.

The decision heralds a new and complicated era for Turkey, a Muslim-majority country that embodied the fears of many British voters. Britain’s Leave camp had warned during the campaign that closer cooperation with Turkey would produce uncontrolled immigration, crime and terrorism.

Now, as the U.K. vote emboldens nationalists from France to Italy to the Netherlands who also want to leave the EU, existential threats facing the bloc endanger years of efforts by Ankara and Brussels to deepen ties and meet common challenges.

“The European Union’s disintegration has started,” Turkish Deputy Prime Minister Nurettin Canikli said Friday on Twitter . “Britain was the first to jump ship.”

Turkish Prime Minister Binali Yildirim said the U.K. decision highlighted dissatisfaction with the EU. He called on the bloc to evaluate the vote result carefully and embrace more inclusive policies.