The preliminary results are in for Turkey’s local elections, and at first glance they don’t look good for the ruling Justice and Development Party (AKP).

In the capital of Ankara, the Republican People’s Party (CHP) candidate took 50.9 percent of the vote, over the AKP’s 47.2 percent. In Istanbul – where President Erdogan served as mayor from 1994-1998 – the margin was much closer, with the CHP candidate taking 48.8 percent to the AKP’s 48.5 percent. In Izmir, the country’s third-largest city, the opposition CHP ran away with it, taking 58 percent to the AKP’s 38.5 percent.

Though the results aren’t favorable for the AKP in the three largest cities, nation-wide its alliance pulled 51.6% of the vote, which suggests sustained support even in these trying times for the Turkish economy.