Turkish flags flutter nest to a huge portrait of Turkey's President and leader of the Justice and Development Party (AKP) Recep Tayyip Erdogan as he gives a speech during an AKP pre-election rally in Yenikapi Square in Istanbul on June 17, 2018. - With a week to go to crucial Turkish elections, the leader of the AKP  and his main rival of the secular Republican People's Party (CHP) are trading blows in an unexpectedly bruising fight to win control of the country. (Photo by Aris MESSINIS / AFP)        (Photo credit should read ARIS MESSINIS/AFP/Getty Images)
PHOTO: ARIS MESSINIS/AFP/AFP/Getty Images
Turkish flags flutter nest to a huge portrait of Turkey's President and leader of the Justice and Development Party (AKP) Recep Tayyip Erdogan as he gives a speech during an AKP pre-election rally in Yenikapi Square in Istanbul on June 17, 2018. - With a week to go to crucial Turkish elections, the leader of the AKP and his main rival of the secular Republican People's Party (CHP) are trading blows in an unexpectedly bruising fight to win control of the country. (Photo by Aris MESSINIS / AFP) (Photo credit should read ARIS MESSINIS/AFP/Getty Images)
Now playing
03:32
The Erdogan effect: How one man shaped Turkey
FILE- In this Nov. 7, 2019 file photo, the International Criminal Court, or ICC, is seen in The Hague, Netherlands. The Prosecutor of the International Criminal Court said Wednesday, March 3, 2021 that she has launched an investigation into alleged crimes in the Palestinian territories. Fatou Bensouda said in a statement the probe will be conducted "independently, impartially and objectively, without fear or favor."(AP Photo/Peter Dejong, File)
PHOTO: Peter Dejong/AP
FILE- In this Nov. 7, 2019 file photo, the International Criminal Court, or ICC, is seen in The Hague, Netherlands. The Prosecutor of the International Criminal Court said Wednesday, March 3, 2021 that she has launched an investigation into alleged crimes in the Palestinian territories. Fatou Bensouda said in a statement the probe will be conducted "independently, impartially and objectively, without fear or favor."(AP Photo/Peter Dejong, File)
Now playing
01:57
ICC to investigate alleged war crimes by Israel and Hamas
Attorney-General Christian Porter speaks during a media conference on March 03, 2021 in Perth, Australia. Attorney-General Christian Porter has publicly confirmed he is the cabinet minister named in a historical rape allegation from 1988 which came to light in the last week and has emphatically denied the allegations.
PHOTO: Paul Kane/Getty Images
Attorney-General Christian Porter speaks during a media conference on March 03, 2021 in Perth, Australia. Attorney-General Christian Porter has publicly confirmed he is the cabinet minister named in a historical rape allegation from 1988 which came to light in the last week and has emphatically denied the allegations.
Now playing
02:25
Australian Attorney General denies historical rape allegation
Now playing
03:08
Cuba aims to produce its own Covid-19 vaccine
Police shoot stun grenades at Arab Israelis protesting an increase in gang violence in their towns.
PHOTO: CNN
Police shoot stun grenades at Arab Israelis protesting an increase in gang violence in their towns.
Now playing
04:18
Police shoot stun grenades at peaceful Arab-Israeli protesters
Mount Sinabung in Indonesia erupted on March 2, launching a cloud of ash and dust several kilometers into the sky. No one was injured in the eruption but authorities have warned people to stay away from the crater.
PHOTO: olcanological Survey of Indonesia via Reuters
Mount Sinabung in Indonesia erupted on March 2, launching a cloud of ash and dust several kilometers into the sky. No one was injured in the eruption but authorities have warned people to stay away from the crater.
Now playing
00:40
See this volcano in Indonesia erupt
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
PHOTO: Courtesy Maxar
New satellite images taken by Maxar show that North Korea sometime in the past year built a structure that may be intended to obscure entrances to an underground facility where nuclear weapons or nuclear weapons components are stored.
Now playing
01:47
See images US intelligence claims is a secret weapons site
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
nigeria kidnapped schoolgirls released Busari pkg intl ldn vpx_00000423.png
Now playing
02:09
Tears of joy and relief as 279 Nigerian schoolgirls return home
Protesters take cover behind homemade shields as tear gas is fired during a demonstration against the military coup in Yangon on March 1, 2021. (Photo by STR / AFP) (Photo by STR/AFP via Getty Images)
PHOTO: STR/AFP/AFP via Getty Images
Protesters take cover behind homemade shields as tear gas is fired during a demonstration against the military coup in Yangon on March 1, 2021. (Photo by STR / AFP) (Photo by STR/AFP via Getty Images)
Now playing
02:16
Footage shows tear gas, flash bangs used on protesters in Myanmar
01 rivers migrants pkg 02282021
PHOTO: CNN
01 rivers migrants pkg 02282021
Now playing
04:41
CNN correspondent speaks to migrants making dangerous journey to US
PARIS, FRANCE - MARCH 01: Former French President Nicolas Sarkozy leaves court after being found guilty of corruption and influence-peddling on March 01, 2021 in Paris, France. Mr. Sarkozy is only the second French president in modern times to have been convicted, after the conviction of former President Jacques Chirac in 2011.  (Photo by Kiran Ridley/Getty Images)
PHOTO: Kiran Ridley/Getty Images
PARIS, FRANCE - MARCH 01: Former French President Nicolas Sarkozy leaves court after being found guilty of corruption and influence-peddling on March 01, 2021 in Paris, France. Mr. Sarkozy is only the second French president in modern times to have been convicted, after the conviction of former President Jacques Chirac in 2011. (Photo by Kiran Ridley/Getty Images)
Now playing
03:23
'An earthquake in French politics': CNN reporter on Sarkozy sentence
PHOTO: Isaac Abrack
Now playing
03:00
Hear from schoolgirl who escaped abduction in Nigeria
UK police appealed for help Friday, Feb. 20, 2015, to find three teenage girls who are missing from their homes in London and are believed to be making their way to Syria.

The girls, two of them 15 and one 16, have not been seen since Tuesday, Feb. 17, 2015, when, police say, they took a flight to Istanbul. One has been named as Shamima Begum, 15, who may be traveling under the name of 17-year-old Aklima Begum, and a second as Kadiza Sultana, 16. The third girl is identified as Amira Abase, 15.
PHOTO: Metropolitan Police
UK police appealed for help Friday, Feb. 20, 2015, to find three teenage girls who are missing from their homes in London and are believed to be making their way to Syria. The girls, two of them 15 and one 16, have not been seen since Tuesday, Feb. 17, 2015, when, police say, they took a flight to Istanbul. One has been named as Shamima Begum, 15, who may be traveling under the name of 17-year-old Aklima Begum, and a second as Kadiza Sultana, 16. The third girl is identified as Amira Abase, 15.
Now playing
00:39
Shamima Begum loses legal bid to return home to appeal citizenship revocation
PHOTO: Obtained by CNN
Now playing
08:29
How a religious festival turned into a massacre
Saudi Crown Prince Mohammed bin Salman attends a conference in the Saudi capital Riyadh on October 2018.
PHOTO: FAYEZ NURELDINE/AFP/Getty Images
Saudi Crown Prince Mohammed bin Salman attends a conference in the Saudi capital Riyadh on October 2018.
Now playing
02:10
US intel report: Saudi Crown Prince responsible for approving Khashoggi operation
A Fijian rugby team serenaded workers in the Sydney hotel where they are quarantining.
PHOTO: Costa Argyrous
A Fijian rugby team serenaded workers in the Sydney hotel where they are quarantining.
Now playing
00:45
See Fijian rugby team serenade quarantine staff in Australia
(CNN) —  

On a recent afternoon at a coffee house in the Istanbul neighborhood where Turkey’s president grew up, Güngör Saytuğ was ruminating on his old friend’s rise to power.

Decades ago, Saytuğ and Recep Tayyip Erdoğan were sitting in the locker room after an amateur soccer game when Erdoğan announced out of the blue that he would someday become prime minister, and then president.

Not long after that, Erdoğan launched his political career as a self-styled man of the people, playing on his “Kasımpaşalı” roots to rocket from relative obscurity to mayor of Istanbul in 1994. To many voters here, he is still the local boy from Kasımpaşa, a working-class neighborhood known for its naval tradition and its top-flight soccer team. Erdoğan never made it to the pros, but the stadium now bears his name.

“He never gives up. If he sets his mind to something, he manages to achieve it,” Saytuğ told CNN.

President Erdoğan sings at an AKP rally in Kasımpaşa on March 5, ahead of the first vote.
PHOTO: Ozan Kose/AFP/Getty Images
President Erdoğan sings at an AKP rally in Kasımpaşa on March 5, ahead of the first vote.

But in March, for what seemed like the first time in more than 25 years of political dominance, Erdoğan suffered a devastating blow: his Justice and Development Party (AKP) lost the mayoral elections in Turkey’s three biggest cities to the main opposition Republican People’s Party (CHP).

Especially hard to swallow was the AKP’s defeat in Istanbul – considered, at least by Erdoğan, to be the crown jewel of Turkish politics.

Perhaps no one understands the significance of Turkey’s largest city more than Erdoğan, 65, who used it as a launch pad for his career. “Whoever wins Istanbul, wins Turkey,” he is fond of saying. The president’s birthplace has become a concentrated source of wealth and power for his party, oiling the rest of Turkey’s political machine. Losing control of it means losing funds and resources that subsidize pro-government media, businesses, contractors and the AKP apparatus at large.

AKP supporters wave Turkish flags at a campaign rally in Kasımpaşa in March.
PHOTO: Ozan Kose /AFP/Getty Image
AKP supporters wave Turkish flags at a campaign rally in Kasımpaşa in March.

Rather than accept defeat, the AKP challenged the outcome of the race, claiming fraud. In a controversial ruling, the Turkish election board canceled the result and ordered a new vote, sparking outrage from the CHP, which described the move as “plain dictatorship.”

The rerun, which will be held Sunday, is a pivotal moment. If the opposition defies the odds to defeat Erdoğan’s party for a second time, its supporters will hail the victory as a turning point for a country that is sliding into autocracy. And even if the AKP reclaims Istanbul, experts say the re-vote has already exposed a chink in Erdoğan’s armor.

“This is more than just a local election in the country. In many ways, it’s a referendum on Erdoğan and his reign,” said Aslı Aydıntaşbaş, a Turkey expert at the European Council on Foreign Relations.

Aydıntaşbaş, who covered Turkish politics as a journalist for years before becoming a senior policy fellow, said there has long been a misconception in foreign media that the rule of Erdoğan – who has been president since 2014 – is iron-clad.

“The image of Erdoğan here is not an almighty figure … not the popular leader who is so safe and secure … quite the opposite,” she said.

A woman peers out from behind a giant poster of Erdoğan during a March rally in Kasımpaşa.
PHOTO: Ozan Kose/AFP/Getty Images
A woman peers out from behind a giant poster of Erdoğan during a March rally in Kasımpaşa.

Many residents of Istanbul are weary of the AKP’s long reign, and blame Erdoğan for the economic crisis, which is felt on the streets in soaring food costs, double-digit unemployment and Turkey’s plummeting currency, the lira.

But with the serious restrictions facing the opposition, including a ban on anti-government demonstrations in Istanbul, citizens have few remaining places to protest beyond the ballot box.

The president’s office did not return CNN’s request for comment on Erdoğan’s involvement in the Istanbul election campaign.

Fight for democracy

Across the city in Bakırköy, an upper-middle class neighborhood overlooking the Sea of Marmara, people gathered last Sunday in bars and cafés to watch the top two candidates for Istanbul’s mayor face off in the first live televised debate Turkey has seen in 17 years.

The debate pitted Binali Yıldırım, of the AKP, against opposition candidate Ekrem İmamoğlu, of the CHP, who won the vote in March. İmamoğlu, who is being backed by an energized array of opposition groups, called the re-vote a “fight for democracy against those who violated our rights and the rights of 16 million people.” Yıldırım, a former prime minister, responded with the AKP’s claim that the vote had been stolen.

Turkey’s fractured opposition has rallied behind İmamoğlu, leaving their differences to one side in a bid to beat Erdoğan. But even with this coalition building, İmamoğlu only narrowly edged out the AKP candidate, signaling the enduring power of the president’s party.

At an Istanbul café, people watch a live TV debate between Istanbul's main mayoral candidates.
PHOTO: Burak Kara/Getty Images
At an Istanbul café, people watch a live TV debate between Istanbul's main mayoral candidates.

And while the matchup marked a historic moment for Turkey’s electorate, whose daily news digest has increasingly consisted of pro-government programming on mainstream media outlets, few observers in a Bakırköy café felt that the broadcast signaled much in the way of change.

Sitting at a table watching the debate with a group of friends, all in their 30s, Gizem Sürer said that while everyone she knows is talking about justice, she sees little way for young people like her to get it.

“Since the first day of AKP’s ruling this country, I personally have been observing a deep aspiration for democracy among people. When we look at these places, coffeehouses in villages, in public squares, or party tents, people are frequently putting into words the notions of democracy and justice,” Sürer said.

“But, when we look to the streets, we see bans for equal and fair debates, bans for people to express their opinion,” she added. Those around her nodded.

People walk past Yıldırım and İmamoğlu election posters amid campaigning for the rerun.
PHOTO: Chris McGrath/Getty Images
People walk past Yıldırım and İmamoğlu election posters amid campaigning for the rerun.

Since a failed military coup in 2016, Erdoğan has consolidated his power and set into motion a sweeping crackdown on dissent, jailing opposition politicians and journalists. And, last year, he won re-election with even greater unchecked authority. In response, many Turks have opted to leave the country, prompting what has come to be known as the country’s “brain drain.”

“Unfortunately, we are being forced to dream about going abroad,” said Özgür Türker, who was playing Okey, a traditional Turkish tile-based game, and sipping coffee at a table near Sürer.

’For our president, it’s his campaign’

Across the glittering blue Bosphorus in Üsküdar, a residential district on Istanbul’s Asian side, campaigners for both candidates have set up election tents, blaring political anthems and handing out flyers to passersby on their way to the ferry station.

Nurettin Adıyol, an AKP volunteer, said that many of the people he speaks to on the street complain about the economy and tell him the government isn’t working hard enough for its citizens. But Adıyol disagrees.

“We took [over] this city as a garbage city,” Adıyol said, alluding to Istanbul’s pre-Erdoğan days. “Did you forget about the days that you were carrying water in barrels? Children and youngsters do not know about those days.”

The battle is on for the swing voter, and Adıyol is trying to remind them just how much the AKP – and, by extension, Erdoğan – has done for Istanbul over more than two decades.

“For our president, it’s his campaign,” Adıyol said. “In everywhere that he is present, we will win the election.”

In reality, Erdoğan has been noticeably absent in the lead-up to the June 23 rerun, forgoing plans to campaign in dozens of rallies for the AKP. Political pundits say that’s because of fears that his involvement could cost his candidate the race.

An AKP election banner featuring Yıldırım and Erdoğan hangs from an Istanbul building ahead of the March election.
PHOTO: Miguel Angel Sanchez/Bloomberg via Getty Images
An AKP election banner featuring Yıldırım and Erdoğan hangs from an Istanbul building ahead of the March election.

“Erdoğan has been told by a number of political advisers, as well as the Yıldırım campaign, that his overwhelming presence in the city is actually a turn-off for some voters … those that feel AKP is on the wrong path, that it’s gotten too authoritarian, and that the government is responsible for the economic downturn,” Aydıntaşbaş said.

But, in the days since the debate, Erdoğan’s presence has increased as İmamoğlu appears to be pulling ahead of Yıldırım. Erdoğan met with foreign journalists on Thursday, claiming that polls putting the opposition candidate in the lead were “manipulative.”

“The real poll will be Sunday,” Erdoğan told reporters.

The sense of wariness among voters is palpable at a farmer’s market in the tangle of back streets above Üsküdar’s ferry station.

Two middle-aged women, who asked that their names not be used for fear of backlash from the government, said that they’re reminded of just how bad things have gotten every time they go to do their grocery shopping.

“Everything is troublesome, prices are sky-high, everything is prohibitively expensive, we are having a hard time making ends meet,” one of the women said, gripping a bag of produce.

Ahead of the initial mayoral election, Turkish authorities set up state food markets to sell subsidized fruit and vegetables amid a surge in food prices, which the government blames on retailers – rather than inflation. But the move, criticized by some as a bid to buy votes, hasn’t done much to change hearts and minds here.

“Does anybody care about this, I don’t know. I don’t think they really care,” she added, before turning on her heel and marching away from a selection of tomatoes.

“It is enough. Enough. Enough now. Somebody else should take over Istanbul,” her friend agreed.

CNN’s Işıl Sarıyüce reported from Istanbul and Eliza Mackintosh wrote from London.