Imamoglu received a certificate confirming his win by a slim margin in Istanbul against the ruling party candidate, former Prime Minister Binali Yildirim, hours after a final appeal by the ruling party was rejected.
Large crowds of supporters chanting "Mayor Ekrem" gathered outside a courthouse where the 48-year-old former district mayor was given his certificate, as well as outside the municipality, where he formally took over the city hall.
"We are aware of the needs of the city. We know the citizens' requests and we will immediately begin to serve them," Imamoglu told supporters. He called on the Supreme Electoral Board to terminate the uncertainty over the election in the city with "sensitivity, and rapidly."
In a major upset, Erdogan's party lost control of the capital, Ankara, and the country's financial and cultural hub, Istanbul, where the party had repeatedly contested results. Citing alleged widespread irregularities, the ruling party on Tuesday filed an "extraordinary objection," asking the Supreme Electoral Board to cancel the Istanbul election. If accepted, elections in Istanbul could be repeated June 2.
The party maintains that the elections were marred by "organized irregularity" and has submitted three suitcases of documents purportedly detailing fraud to the electoral board. The opposition Republican People's Party, or CHP, said the final count gave Imamoglu a 13,700-vote lead over Yildirim. That difference narrowed from the initial 25,000 votes announced before a series of recounts.
The opposition party says the ruling party's objections to the results lack credible evidence. It also points at ruling party statements prior to the elections reassuring the safety of the polls and rejecting the possibility of fraud.
Both Ankara and Istanbul had been held by Erdogan's conservative, religious-based party and its predecessor for 25 years. Istanbul, with its 15 million residents and strategic location straddling Europe and Asia, made up 31% of Turkey's GDP of $851 billion in 2017 and draws millions of tourists.
The Istanbul metropolitan mayorship and its subsidiaries had a budget of $8.8 billion last year. The municipality has awarded lucrative contracts to businesses close to the government over the years and offers huge financial resources and employment opportunities.
Erdogan's rise to power began as Istanbul mayor in 1994 and he has repeated numerous times in pre-election rallies: "Whoever wins Istanbul, wins Turkey" and "Whoever loses Istanbul, loses Turkey."