Turkish President Recep Tayyip Erdogan claimed in remarks to reporters on Monday that his ruling Islamist Justice and Development Party (AKP) lost the March 31 mayoral elections in Istanbul and Ankara because “organized crime” elements had staged a “robbery.”

The AKP is formally demanding a recount in those elections, claiming fraud and irregular activities at the ballot enabled the Republican People’s Party (CHP), the secularist party founded by Mustafa Kemal Atatürk, to take over the mayorships. Both major city elections were close, but Istanbul’s – where the CHP won by less than one percentage point – was a closer race.

AKP Deputy Chairman Ali Ihsan Yavuz told reporters on Sunday that party officials believe “organized irregularity” hurt the party and have officially appealed for a recount. Erdogan supporters like Yeni Safak editor-in-chief Ibrahim Karagül – one of Turkey’s most vocal Islamists in media – have already blamed supporters of Erdogan nemesis Fethullah Gülen and secularist Kurdish groups for their losses. Karagül referred to the elections as a “coup” shortly after the vote.

Erdogan’s claims place him on the other side of the results of the 2018 presidential elections, which allow him to remain in power until 2021. Opposition candidates accused Erdogan of stealing that election both through fraud and “irregularities” at the polls and censorship of opposing candidates on television and in other media. One presidential contender, Democratic People’s Party (HDP) candidate Selahattin Demirtas, was forced to campaign from prison after being arrested for allegedly supporting “terrorism” by standing up for the rights of Turkey’s Kurdish minority.

Speaking shortly before boarding a flight to Moscow for a scheduled meeting with Russian President Vladimir Putin, Erdogan claimed that AKP officials had found evidence of “organized” attempts at stealing the election.

“We, as the political party, have detected an organized crime and some organized activities,” Erdogan told reporters, according to the Turkish state-run Anadolu news agency. “Election process is completed, the next process is judicial process.”

“There is an element of robbery in all of this. There was some theft at the ballot box,” he added, the Turkish newspaper Hurriyet reported. “No one has the right to declare themselves victorious with a difference of around 13,000-14,000 votes.”

Erdogan reportedly claimed that “some organized crimes” took place in Istanbul and that police now possessed the evidence of these crimes as compiled by AKP officials. He justified calls for a recount by noting that recounts are not unheard of in free countries like the United States.

As head of the AKP, Erdogan is responsible for steering the party towards victory. He also has a personal connection to the Istanbul race beyond his position: the AKP candidate for mayor is Binali Yıldırım, Erdogan’s former prime minister. Yıldırım ran for the mayorship after becoming the country’s last prime minister after Erdogan enacted reforms to give himself the prime minister’s powers as part of a shift to a presidential system.

According to Hurriyet, Yıldırım received 48.55 percent of the vote in Istanbul, compared to 48.80 percent for CHP candidate and mayor-elect Ekrem İmamoğlu. While Erdogan discussed the Istanbul election most closely on Monday, the Ankara mayoral election was also a close race. Winner Mansur Yavaş of the CHP received 50.93 percent of the vote compared to 47.12 percent for AKP candidate Mehmet Özhaseki, according to the official results published by Hurriyet.

Despite these losses in Turkey’s largest cities, the AKP remains the ruling party in most of Turkey’s municipalities. The party controls 44.33 percent of mayorships nationwide, compared to 30.12 under CHP administration. The CHP is the largest opposition party in the country, though several other parties also control legislative seats won under the prior parliamentary system.

Erdogan has long been unpopular in Turkey’s cities, which tend to lean secularist and leftist. Erdogan’s policies of imposing Islamic education in schools, promoting political Islam in the cities, and suppressing dissident voices in media have triggered a significant backlash in urban areas. In 2017, CHP leader Kemal Kilicdaroglu attracted a million protesters to a “Justice March” from Ankara to Istanbul meant to demand the release of thousands believed to be political prisoners, arrested in the aftermath of the failed coup against Erdogan in 2016. Hundreds of thousands of Turks were arrested, detained, fired from their jobs, or otherwise ostracized and persecuted for alleged ties to Gülen, who Erdogan blamed for the failed coup (Gülen, who lives in Pennsylvania, denies any involvement in the attack).

In 2018, many of these CHP supporters and Erdogan opponents decried fraud in the nation’s legislative elections, which saw Erdogan’s AKP reclaim the parliament in a narrow victory through a strong turnout in rural areas. The CHP documented “irregularities” at the polls that hurt supporters of their party. Erdogan also banned most coverage of opposition candidates on television after years of arresting or forcing into exile opposition voices in media. In the early months following the 2016 coup attempt, Erdogan’s government shut down 131 media outlets that served as platforms for opposition voices.

Following that election, Erdogan delivered a speech proclaiming, “democracy wins.”

Follow Frances Martel on Facebook and Twitter.