ISTANBUL — The city’s popular mayor was surrounded by enthusiastic crowds, talking about his hopes that the failing economy would improve and his conviction that brighter days for Turkey were just around the bend. But while the scene was familiar, this was not Istanbul, and these were not his constituents.

The mayor, Ekrem Imamoglu, a leading member of Turkey’s political opposition, was recently on the other side of the country, delivering what sounded like a campaign speech in a stronghold of President Recep Tayyip Erdogan’s ruling alliance. It was one of many places across a suffering Turkey where the opposition senses that Erdogan’s supporters can be swayed.

Turkey’s presidential election is not scheduled until 2023. But an economic meltdown that is growing worse by the day — marked by rocketing inflation that has left many unable to afford basic goods, and a nation watching aghast as the currency collapses — has forced a reckoning on Erdogan’s authoritarian rule.

Economists say the crisis is entirely the result of Erdogan’s constant meddling with the central bank and his unwavering campaign to lower interest rates because of his unorthodox view that higher rates cause inflation.

Recent days have provided a snapshot of the country’s turmoil. On Thursday, for the fourth month in a row, the central bank cut interest rates — sending the lira to a record low against the dollar. By Friday, the lira had sagged again, falling to 16.30 against the dollar despite a central bank intervention to prop up the currency.

Erdogan’s televised remarks Sunday, in which he justified reducing interest rates as part of a Muslim duty to combat usury, sent the currency tumbling again early Monday. But the lira was surging again Tuesday morning after Erdogan later on Monday unveiled a plan to protect savings from the currency’s fluctuations.

Turkey’s opposition parties have demanded early elections and a return to a parliamentary system that would reduce the power of the presidency. They have been buoyed by polls showing flagging voter support for Erdogan’s ruling Justice and Development Party, or AKP, as well as for its ultranationalist alliance partner. A coalition of opposition parties, galvanized by the government’s weakness, have organized a series of meetings to sketch common priorities in a post-Erdogan era.

The obstacles to an opposition electoral victory remain steep and include ideological divisions among the parties, personality clashes among their leaders and Erdogan’s continued ability to retain a fiercely loyal base of support among conservative Muslims and others.

But none of that seems to have dented the opposition’s growing sense of confidence.

“We are face-to-face with a ruling government that is nearing the end of its life. They are making mistake after mistake,” said Imamoglu, whose victory in Istanbul’s 2019 mayoral race was part of a wave of opposition victories that showed the vulnerability of Erdogan’s once-dominant political machine.

In a recent interview, the mayor said he had no plans to run for president and that the decision about who will face Erdogan would be up to the leaders of opposition parties.

But he said he was “interested in the future of the country,” and added: “We are discussing what kind of country we would like to construct after winning elections.”

During the 2019 elections, voters said they were worried about the economic downturn, rising inflation and the erosion of Turkey’s democracy, concerns that for many Turks are now a matter of survival. Savings have vanished as the lira has lost more than 40 percent of its value this year. The inflation rate is officially just over 21 percent but is believed to be much higher. In interviews, business owners freely admitted raising their prices as much as 40 or 50 percent, saying they had been left with no choice.

Erdogan, who convinced voters to grant him sweeping new powers in a referendum four years ago, has tried to frame the economic downturn as part of his plan to make Turkey a hub for cheap labor and goods like China, but with better access to Western markets. Such explanations have not contained the public’s anger.

In an earlier stage of the crisis, people were stung by Erdogan’s often dismissive responses to citizens who approached him for help, in encounters widely shared on social media. Now, tales of hardship have taken center stage and criticism of his government has become increasingly bold, with viral videos of long lines for subsidized bread or a vegetable seller dividing heads of cabbage into affordable chunks.

“I just sold a quarter of a cabbage to a customer. Half of a half. And if there are still people saying that the economy is good then they should open their eyes and look around,” the seller in the video said.

In an outdoor market in Istanbul’s Fatih neighborhood, vendors selling pickles, cheese and cosmetic goods recently said customers were walking away with less.

For Tugce Gonul, an 18-year-old dentistry student doing the family shopping, a 20-lira note — worth about $1.40 at the time — bought only half the customary block of cheese. Olives had more than doubled in price. Her school workbooks were unaffordable. She no longer shopped in supermarkets. She said she dreamed of leaving the country “to start over.”

In a measure of the despair, recent polls showed that a united opposition could beat Erdogan’s alliance in an election, said Mesut Yegen, a fellow at the Center for Applied Turkey Studies at the German Institute for National and Security Affairs. But the numbers only told part of the story.

“We don’t know whether they can form a coalition or find a common candidate for presidential elections, or produce the impression for the public they can build a government,” he said.

Differences among the biggest parties — in particular, the right-wing nationalist Good Party and a leftist pro-Kurdish party — could come to the fore. Then there is the question of how Erdogan would react to their challenge.

“He knows he can lose, and we know he is not someone who can easily cope with such a likelihood,” said Yegen, adding that the president could pursue a harsher crackdown on the opposition or work to exploit differences among parties aligned against him. “I think he will do both,” he said.

Erdogan’s party challenged Imamoglu’s first victory in the Istanbul mayor’s race, citing irregularities and provoking fears about interference in future elections. Imamoglu, from the Republican People’s party, or CHP, handily defeated the AKP candidate in a do-over vote, propelling the mayor to national prominence.

He has stayed in the public eye as Istanbul’s enthusiastic cheerleader and a critic of the central government’s attempts to interfere in the city’s local government. His trips to European capitals and political battlegrounds in Turkey have further raised his profile and stirred speculation about his plans.

Imamoglu is among several candidates who poll well against Erdogan, along with Ankara Mayor Mansur Yavas and Meral Aksener, the head of the Good Party. But the chairman of the CHP, Kemal Kilicdaroglu, who is widely credited for orchestrating the opposition’s coalition-building effort, has publicly said the two mayors should stand for second terms, fueling speculation that he is determined to run — though analysts say he is a weaker candidate.

Imamoglu said the chairman’s desire for him to serve again was “valuable” and that leading Istanbul was something “every city mayor would want.”

“But decisions can change according to circumstances,” he added.

In the Fatih market, Ilhan Aykut, who sells hair clips and other Chinese-made personal products, was faring better than most, having stocked up on inventory several months ago after predicting the lira’s continued slide. But his supplies will only last so long. “We have never seen a more volatile period,” he said, adding that a “deep, intense wave” of political change was coming.

“It’s going to be the election of a century,” he said.

Read more: