ISTANBUL — Muharrem Ince, a former high school physics teacher who is a Turkish presidential candidate, hurled taunts at his main opponent, President Recep Tayyip Erdogan, with the reckless abandon of a competitor who smelled blood.

He paced with a microphone on top of his campaign bus on a recent afternoon, surrounded by enchanted supporters as he mocked Erdogan’s economic policies, accused the president of ginning up security threats for votes and chided him for spending lavish sums on palaces, calling it a “sin.”   

“The state is collapsing. The state!” Ince said.

“President Ince!” the crowd roared, mimicking his cadence. “President Ince!”

These are heady days for Turkey’s opposition parties, which are charging toward elections for president and parliament in just over a week with a rare sense of unity and a hunch that Erdogan, who has dominated Turkish politics for a decade and a half, may be more vulnerable than he has been in years.  

Their sense of optimism has been fueled by what they say are gaffes by the president, including comments he made that sent the Turkish currency tumbling and revived questions about his stewardship of the economy — a pillar of the president’s appeal. 

Opposition leaders have also cited encouraging poll numbers that they say reflect voter fatigue with the president after a tumultuous few years in Turkey marked by growing tensions with some of the country’s NATO allies and intensifying social polarization at home. The results suggest a possible opposition victory — if not in the presidential race, then in the parliament, where they hope to roll back the majority held by Erdogan’s Justice and Development Party, or AKP.    

Then there is Ince — pronounced Een-jay — the candidate from the Republican People’s Party, or CHP, who has gained popularity as a surprisingly nimble candidate, snatching some of Erdogan’s populist thunder by presenting himself as a Turkish everyman with working-class roots able to bridge the country’s deep divides.  

“His family is religious. He’s more secular,” said Kaan Ercan, a 23-year-old recent university architecture graduate who was one of many young people attending an Ince rally last week. “It’s different, the way he talks. His approach is aimed at all of society.”   

The president’s loyalists say that the optimism of his opponents is misplaced and that voters continue to have faith in Erdogan’s ability to deliver economic growth, and trust the president’s assertions that the currency was being manipulated by foreigners. “We are on the streets,” said Harun Armagan, the 33-year-old vice chair of human rights for the AKP. “We are very hopeful about the results.”  

For both sides, the stakes in the election are high. Erdogan, who has served both as prime minister and as president, will assume even greater authority should he win reelection because of constitutional amendments that were narrowly approved by voters during a bitterly contested referendum last year.  

Erdogan’s supporters say the changes, which created an “executive presidency” diluting the power of the judiciary and the parliament, will give the president more latitude to impose his will on an unruly system and leave him better equipped to govern.  

The opposition views the new system as a nightmare scenario that has weakened checks on the president’s power as he has become more authoritarian after a coup attempt in July 2016, arresting thousands of enemies and opponents and silencing critics of his government’s rule.   

The odds in the coming election are not in the opposition’s favor. Erdogan remains a savvy campaigner and an instinctive populist whose appeals to nationalists and religious conservatives have won him a large and loyal base of supporters.   

He also brazenly deploys the levers of state to his advantage, his critics say — shuttering independent media outlets that would provide balanced coverage of the election campaign and jailing opposition political figures. These include Selahattin Demirtas, a candidate from a pro-Kurdish party who is running for president from prison.  

“There is no level playing field in the pre-election period,” Human Rights Watch wrote in a recent briefing on the election. 

Despite those obstacles, the opposition saw a glimmer of hope in the president’s thin margin of victory in the referendum, which suggested that some disaffected Erdogan supporters had stayed home. The opposition’s attempts to energize its base started in the months after the referendum, when the CHP led a “justice” march over hundreds of miles intended to highlight the government’s arrests of opposition figures, journalists and dissidents. 

As thousands of people joined the march,government officials, unnerved by the spectacle, likened the participants to terrorists.

In April, when Erdogan called for early elections, he framed them as necessary to make Turkey’s government “stronger and more effective” at a time when the country’s military was fighting against Kurdish groups across its borders in Syria and Iraq. But he was also preoccupied with the economy and anxious to stage the elections before it took a turn for the worse, analysts said. 

The economic news did worsen after the president voiced his unorthodox view that high interest rates cause inflation and suggested that he would take greater control of monetary policy after the elections, sending the Turkish lira plummeting to record lows.  

The currency has slightly ­recovered, but the economy’s problems run far deeper, said Atilla Yesilada, an analyst with ­Istanbul-based Global Source Partners. “Years of irresponsible policies have overheated the Turkish economy. High inflation rates and current account deficits are going to prove sticky,” he said. “I think we are at the end of our rope.”  

Sensing an opening, Turkey’s often divided opposition parties have started to come together. Four parties, including the CHP, the nationalist Good Party and the Islamist Felicity Party, formed a coalition to compete in the parliamentary elections, broadening their ideological appeal. The pro-Kurdish Peoples’ Democratic Party, or HDP, did not join the coalition. But Ince, the CHP candidate, visited Demirtas in prison and has recently reached out to Turkey’s Kurds, a critical voting bloc, during his campaign rallies.  

The coalition is “a big deal” and a possible counterweight to Erdogan’s own alliance with another nationalist party, said Omer Taspinar, a Turkey expert at the Brookings Institution. “If the opposition can maintain some sense of unity, they will improve their chances.” The opposition also stands to benefit from the “worsening economy, and the emergence of a charismatic, center left-wing leader,” he said, referring to Ince.  

 There were also signs of fatigue among AKP voters, to the apparent frustration of Erdogan, “who blamed them for not being active enough,” he said. 

But the opposition has not presented a broader plan for Turkey and its future that would rival Erdogan’s grand vision for transforming the country into an economic powerhouse by 2023, a vision punctuated by plans for megaprojects and sprinkled with nationalist rhetoric.  

“The opposition’s main message is, enough is enough. You have been in power too long, you represent the past. Maybe that would work if he was 80 years old,” Taspinar said. “Erdogan is still a force to reckon with, despite his vulnerabilities. He has done well for the middle class.”  

Armagan, the AKP official, said that as he had campaigned for the party’s candidates in recent weeks, voters he encountered “see a lack of vision,” from the opposition.   “Maybe Muharrem Ince made a lot of noise and took some attention,” he said, but added: “You should tell people how you will take this country further.”