Updated

Authorities have confirmed that the opposition's candidate has won the mayoral election in Istanbul, ending nearly three weeks of recounts. Turkey's top electoral body however, has yet to consider a ruling party request for the vote in Istanbul to be invalidated.

Republican People's Party candidate Ekrem Imamoglu received a certificate on Wednesday confirming his win by a slim margin in Istanbul against ruling party candidate Binali Yildirim.

In a major upset, President Recep Tayyip Erdogan's ruling party and its ally lost March 31 local elections in the capital, Ankara, and in Istanbul, where the party had repeatedly contested results.

Citing alleged irregularities, the ruling party on Tuesday filed an "extraordinary objection" to the Istanbul election. If accepted, elections in Istanbul could be repeated June 2.