| How the sausage is made|
Ekrem İmamoğlu (IPA [ecˈræm imamoːɫʊ]) (1970–) is a Kemalist and Social Democrat politician in Turkey, serving as the Mayor of Istanbul since his election in 2019. He had previously served as the mayor of Beylikdüzü district.
He was an unknown name before being announced as the opposition party CHP's candidate for Istanbul, running against pro-government Binali Yıldırım, former Prime Minister, Minister of Transport and Speaker of the Parliament. While initially polling behind, all major opposition parties withdrew their candidates in Istanbul to support him. He won with a very narrow lead of 0.2% in the local election, but the electoral commission ordered a re-run in June after Binali's multiple objections to the commission. He won the second vote in a landslide, with a difference of 9% and became the first center-left mayor of Istanbul in 25 years.
After taking office; he exposed and ended the myriad of corruptions committed by the previous administration, resumed construction on around 150 km of rail transit, and started work on numerous pedestrianization projects.
Previously being the mayor of the Beylikdüzü district, he was announced by the opposition parties, Kemalist CHP and the Conservative İYİ party, as a joint candidate for Istanbul. The pro-Kurdish social democratic HDP also withdrew their candidate from Istanbul and supported him, in order to avoid having Recep Tayyip Erdoğan win the city yet again.  Erdoğan's AKP and ultranationalist MHP had previously nominated Erdoğan's lackey, Binali Yıldırım; who had served as the Minister of Transport and Infrastructure during numerous train crashes and corruption scandals, becoming Prime Minister to be a more loyal replacement for the previous guy, overseeing the July 2016 coup attempt and the purges afterwards, becoming speaker after the position of Prime Minister got abolished to give Erdoğan more power. Binali Yıldırım had way more name recognition than him, and AKP control over the municipality and the central government allowed him to campaign in places where İmamoğlu could not, such as in the subway and in major squares.
Erdoğan's AKP previously held the municipality of Istanbul under Kadir Topbaş, who served from 2004 until his resignation in 2017 to yield to a mayor more loyal to Erdoğan. The municipality was plagued with corruption under AKP, causing most projects to be halted while under construction, blocking the traffic and keeping a lot of public spaces closed for years. The Turkish economy had also taken a sharp downturn after the 2018 financial crisis, alienating a lot of AKP voters.
Despite all of this, morale on the opposition side was fairly low, and İmamoğlu was polling behind for a lot of time until the elections. Probably not expecting to win, he promised a huge amount of projects, and Binali, who was expecting to win, didn't promise that much, instead claiming that Istanbul is a love story for him.
After the polls closed, Binali was on the lead with 10% of the votes, but mysteriously, votes from İmamoğlu's strongholds were arriving way slower. Binali proudly proclaimed victory after 90% of the votes were in, and hanged victory posters all around Istanbul, but İmamoğlu didn't concede, as the gap was narrowing very quickly. After midnight, the gap had narrowed to a mere %0.005 lead in favour of Binali, and the news outlets suddenly stopped updating the vote count. The next morning, the head of the electoral commission would announce that İmamoğlu had won with around 20.000 votes, with a lead of around 0.3%.
Recounts, annullment and the re-run
Binali Yıldırım refused to concede the elections, claimed that FETÖ rigged the vote in favour of İmamoğlu, asked for a recount. After numerous objections and recounts, İmamoğlu won with a lead of 13.000 votes, or 0.2%, and the electoral commission certified him as the Mayor of Istanbul. This didn't stop Binali from objecting even more, and sent a 43 page long objection to the commission. The electoral comission finally caved in, and decided to annull the elections in May, ordering a second election in June. İmamoğlu's certificate was cancelled, and the city governor was appointed in his place after he held the office for 3 weeks. 
Most opposition parties condemned this decision, and unanimously supported İmamoğlu's second run. During his 2 weeks in office, he had exposed many corruption incidents by the AKP administration, and used these in his second campaign extensively. Binali Yıldırım on the other hand, not to fall behind in election promises, started making a lot of promises himself, forgetting that his party and its predecessors has been leading the municipality for 25 years. He would also repeatedly claim İmamoğlu rigged the election, with no evidence. Erdoğan and other ministers would also rally behind him, claiming İmamoğlu was a terrorist, a Gülen supporter, falsely accusing him of being Greek, and comparing him to the Egyptian dictator Abdel Fattah el-Sisi for absolutely no reason.
This second election would also see the first televised debate in Turkish politics in a long time, as Erdoğan has never considered the opposition to be worthy of debating him before. The debate ended up being one of the most watched events in near history of Turkey.
This time, after the polls closed, Binali conceded immediately, and İmamoğlu was leading with 9% of the vote with 95% of the votes in. Even Erdoğan and a good number of his lackeys released congratulations messages to İmamoğlu, and within 2 days, he received his certificate from the electoral commission, and became the next mayor once and for all.