Turkey's ruling party says it will appeal to the country's top election authority, demanding a full recount of votes cast in Istanbul in the March 31 mayoral election.

Ali Ihsan Yavuz, deputy chairman of the ruling AKP party, spoke Sunday as a recount of votes that were previously deemed invalid was continuing in several Istanbul districts.

In a major upset to President Recep Tayyip Erdogan, the opposition took control of Ankara, the capital, and won a tight race for Istanbul in the country's local elections. Erdogan's party is contesting some results, claiming that the elections were "tainted."

Yavuz said the party is seeking a total recount of votes in 38 districts in Istanbul, not just of ballot papers that were canceled. He says the opposition party candidate's lead has narrowed to 16,442 votes as a result of the partial recount.