ISTANBUL — It’s less than four weeks to go before parliamentary elections in Turkey on June 7, and it looks like President Recep Tayyip Erdogan is panicking. Or worse.

A popular refrain among his political opponents, and on the street, is that Erdogan has lost his marbles and is driven by an insatiable appetite for power. Ever since he moved into a lavish 1,100-room palace in Ankara last year, Erdogan has been accused of succumbing to an out-of-control urge for grandeur. Kurdish politician Abdullah Zeydan says the president “thinks he is a sultan.” Meral Aksener, a nationalist politician and deputy speaker of parliament, claims Prime Minister Ahmet Davutoglu was telling people behind closed doors that Erdogan “is out of his mind.”

“Obviously, there is panic,” said Yavuz Baydar, a respected journalist.

At a minimum there is frustration for the president of this country with huge strategic importance, which has the second largest army in NATO and borders Iran, Iraq and Syria or, if you will, the Islamic State. Over the course of 12 years in power, first as prime minister and since last year as president, Erdogan has overseen unprecedented economic stability and growth in Turkey, trimmed the power of the military, with its long history of coups and its reputation as “the deep state,” and entered into an important dialogue with Kurdish politicians and even Kurdish rebels.

But polls say Erdogan, 61, will probably fail to get the majority he wants to push through sweeping constitutional changes to give himself unlimited but as yet unspecified power as president. The economy has grown sluggish of late, unemployment is on the rise, and the political opposition is resurgent, all of which spells trouble for Erdogan’s ruling Justice and Development Party (AKP). Some polls suggest the AKP could even lose its majority in parliament.

Even though Erdogan nominally had to give up the post as the AKP chief when he became head of state last year, he has remained the de facto leader of the party and the government. The Turkish constitution says the president has to be impartial and to keep out of party politics, but Erdogan has no intention to keep out of the fray. The country is facing a critical poll, he says: “It is unthinkable for me to stay on the sidelines.”

Certainly Erdogan has a lot at stake. If the result of the June election does not allow him to introduce the presidential rule he wants, it might never happen. “If he cannot achieve this goal, it could mark the first defeat in his political life,” writes columnist Murat Yetkin in the English-language Hurriyet Daily News.

So Erdogan is scrambling. According to news reports, he is scheduled to appear at more than 30 rallies before polling day, most of them officially billed as opening ceremonies for public projects. Erdogan traveled to Germany and Belgium to address Turkish voters there.

Most polls say the AKP is likely to receive between 40 and 45 per cent of the vote, much more than any other party. But a simple victory is not enough for Erdogan. He wants to pulverize the opposition in order to introduce a presidential system that Kurdish party leader Selahattin Demirtas has called a “constitutional dictatorship.”

Erdogan says the current parliamentary system is too cumbersome if Turkey wants to take on a bigger role in the world. But critics like Demirtas say Erdogan’s ambition means the new system is unlikely to include the checks and balances that limit the power of the president in the United States and in other countries. In fact, Erdogan has not given any details of the sort of presidential rule he has in mind, he is just telling voters they have to give him the parliamentary power to make whatever changes he wants.

On the campaign trail, AKP officials and candidates are facing an uphill battle to fulfill Erdogan’s wishes. A party needs the support of at least 367 of the 550 lawmakers in parliament to change the constitution; with at least 330 deputies, a party can send a bill for constitutional changes to a referendum. At the election in 2011, the AKP received 327 seats after it raked in almost 50 per cent of the popular vote. This time, the president has called on voters to give him 400 deputies to change the constitution. All polls agree that this is out of the question.

Erdogan’s critics are concerned that the president might resort to foul play to ensure an AKP landslide. The secularist Republican People’s Party (CHP), Turkey’s biggest opposition group, says it will send a total of 525,000 volunteers to observe vote-counting on polling day. One reason the opposition is worried is that several power cuts hindered vote-counting after local elections last year, triggering accusations of vote-rigging to the AKP’s benefit. At the time, the government said a cat had entered a power distribution unit and caused a short circuit.

CHP deputy chairman Tekin Gursel warned Erdogan might take even more desperate steps and start a military adventure in Syria in an effort to cash in on a wave of nationalism or postpone the election. Prime Minister Ahmet Davutoglu denied the claim.

“The AK Party and Erdogan may wish to take crazy risks, but I don’t think any high-level Turkish military staff would go [along] with it,” former AKP lawmaker Haluk Ozdagla told the opposition newspaper Today’s Zaman.

It is not the first time that politicians and other observers in Ankara wonder about the president’s state of mind. When Erdogan raged against anti-government protesters taking part in the Gezi riots of 2013, Turkey’s Medical Association said it was concerned about the mental health of the then-prime minister. Nationalist leader Devlet Bahceli said last year Erdogan had become “crazy for power.”