Turkey’s ruling AKP party has demanded that the results from local elections in Istanbul be annulled, as the country’s opposition party claimed victory.

President Recep Tayyip Erdogan’s party wants the votes cancelled on the grounds that illegal voter registrations were made and have effected the result, Haberturk news agency reported.

Haberturk, without citing sources, said the AKP office in Istanbul’s Buyukcekmece district had appealed to the provincial electoral office to annul the vote across the city, but that the request was rejected by the provincial election board.

This comes as Turkey’s main opposition candidate in last Sunday’s Istanbul local elections said he remained ahead by 18,742 votes on Friday after a recount of invalid votes in 17 of the city’s 39 districts.

Late on Thursday, election officials expanded the vote recount in Istanbul, broadcaster CNN Turk said. It was unclear how many districts would ultimately see recounts.

Election in Turkey: the reaction in pictures Show all 10 1 /10 Election in Turkey: the reaction in pictures Election in Turkey: the reaction in pictures Supporters of Mr Erdogan celebrate in Istanbul Getty Election in Turkey: the reaction in pictures A supporter of Mr Erdogan carries his portrait in front of a Turkish flag Reuters Election in Turkey: the reaction in pictures Following the election, a shipowner reads a newspaper that covers the result AP Election in Turkey: the reaction in pictures Supporters of Muharrem Ince, defeated opposition candidate, wait outside the Republican People's Party (CHP) headquarters following Mr Erdogan's claim of victory Getty Election in Turkey: the reaction in pictures People in an Instanbul barber shop listen to Muharrem Ince's speech following the results EPA Election in Turkey: the reaction in pictures Supporters of the pro-Kurdish People's Democratic Party (HDP) hold photos of its leader Selahatin Demirtas AFP/Getty Election in Turkey: the reaction in pictures Supporters of Mr Erdogan celebrate outside the AK party HQ in Ankara Getty Election in Turkey: the reaction in pictures Mr Erdogan waves to supporters in Ankara AP Election in Turkey: the reaction in pictures Mr Erdogan waves to supporters in Ankara AP Election in Turkey: the reaction in pictures Supporters of Mr Erdogan light flares as they celebrate the result AP

Republican People’s Party (CHP) mayoral candidate Ekrem Imamoglu told Turkey’s Fox TV he did not expect the gap between his party and the AKP to change substantially when the recount in the country’s largest city was completed.

“From what I see, it should end this weekend. It will fall into a 18,000 to 20,000 range, that’s what all the simulations show. These are very tight numbers,” he said.

He said 119,652 invalid votes had been recounted, with 2,184 votes added in favour of the AKP and 785 added for the CHP.

The AK party said it would also demand a wider check on votes across the capital Ankara, which, according to initial results, it also narrowly lost in the nationwide municipal vote.

Those losses, if confirmed, would be particularly painful for Mr Erdogan, whose party and its predecessor have dominated the two cities for 25 years.

Mr Erdogan launched his political career in Istanbul and served as the city’s mayor in the 1990s.

On Wednesday, Turkey’s High Election Board ordered a full recount in three of Istanbul’s 39 districts and a recount of invalid ballots in 15 districts.

However, late on Thursday, the board decided there would be a full recount in those 15 districts as well, CNN Turk said.