The rolling hills by the Black Sea, 90 minutes north-west of Istanbul, have long been prized for their dense forest and pristine lakes. Now the water buffalo that graced this landscape and supplied the city with much of its dairy produce are vanishing from what Recep Tayyip Erdoğan, the president of Turkey, has turned into one of the world’s biggest building sites.

About 2.5m trees are being cleared from an area of 6,000 hectares (15,000 acres). The lorries are bumper to bumper, 24 hours a day. The locals can barely sleep, nor cross the street for the noise and the traffic. “The forests are gone, the villages are gone, the livestock is gone,” says Cemalettin Gün, a farmer. Prominent among the tens of thousands of election posters covering Istanbul is the explanation for the construction frenzy. “We are building the world’s biggest airport,” boast the posters of the governing Justice and Development party, or AKP, that Erdoğan created and turned into the most formidable political machine in the country’s history.

Erdoğan loves gargantuan, world-beating projects – a huge election poster of himself and the prime minister, Ahmet Davutoğlu, entered the Guinness Book of Records last week as the biggest ever, anywhere. And he seems to like felling trees. Less than a year ago in Ankara he moved into a new presidential palace of pharaonic proportions, worthy of Nicolae Ceaușescu or Saddam Hussein. It outstrips Washington’s White House by a factor of 30. The staff include five experts, who check Erdoğan’s food for poisoning or contamination. The Ankara palace also required a major exercise in forest clearance. Turkish courts, most recently last week, repeatedly ruled the building illegal. “Let them try to knock it down. I’m moving in anyway,” the president responded.

When Turkey goes to the polls on Sunday, in what is shaping up to be an epic and fateful election, Erdoğan and his legacy will be the main, if not the only, issue on voters’ minds. “It’s what he calls the new Turkey,” says Cengiz Çandar, a leading political analyst. “This is about his legacy and he’s very ambitious. He needs a strong presidency. He’s also very uneasy about corruption allegations and needs safeguards. Some fear it might be Turkey’s last election – before a dictatorship.”

A man walks with a flag of the Nationalist Movement party (MHP) during a campaign rally in Istanbul. Photograph: Ozan Kose/AFP/Getty Images

Some fear it might be Turkey’s last election – before a dictatorship Cengiz Çandar, political analyst

The reason for such worries is that Erdoğan has turned the ballot into a kind of referendum on his one-man drive to rewrite the country’s constitution, abolish parliamentarianism and install a powerful new executive presidency occupied by himself. Paradoxically, he is not even running for election. As head of state since last August, following a three-term, 12-year premiership, he is supposed to be non-partisan, above the political fray. Instead he is pounding the country, speaking himself hoarse. During a recent campaign week, he notched up 44 hours on loyalist national television.

“Erdoğan has proven since 1994 – when he was mayor of Istanbul – that he can reach any goal he sets himself,” says Metin Yüksel, the deputy editor of Sabah, a daily newspaper and AKP mouthpiece. “No opposition has been able to stop him. Turkish voters like a leader.”

The main question in the election is whether Turkish voters will opt not so much to stop Erdoğan as to clip his wings and deny him, for now, his big plans for systemic change, entrenching his own power. Since his 2002 landslide thrust Turkey into a new era that started with great promise and in recent years, by general consensus, has degenerated into whimsy and authoritarianism, Erdoğan has led the AKP to three election victories, increasing its vote every time and securing comfortable absolute majorities in the 550-seat parliament in Ankara.

Constitutional grapple

To change the system, the AKP needs a two-thirds, or 367-seat, majority enabling it to rewrite the constitution. Failing that – and it looks highly improbable – it needs a three-fifths, or 330-seat, majority, which would allow it to call a plebiscite on constitutional revision. That, too, is unlikely, according to the opinion polls. But there is general agreement that the party is the slickest, most organised political machine Turkey has ever seen. All bets are off. The AKP owns the bureaucracy, controls the media, has returned the army to barracks and marginalised the military, traditional arbiters of Turkish politics. Erdoğan used his final term as prime minister to curb the independence of the key institutions of state – the constitutional court, the parliament, the central bank, the prosecution and judiciary services.

Independent media are cowed. Social media are regularly threatened. Schoolchildren are prosecuted for making fun of a president who appears increasingly thin-skinned. He remains the undisputed party leader and is said to have vetted for loyalty to him the AKP’s lists of candidates for seats next Sunday. In discussions on the election campaign, the name of Davutoğlu, who is party president, hardly crops up, while talk of Erdoğan is ubiquitous. “This is a presidential system already. It’s just not legal,” says Çandar. “The question is whether he can legalise it and legitimise it.”

There are ample indications that he may fail. In Istanbul’s wondrous Grand Bazaar, the traders are often seen as representing Erdoğan’s core constituency – conservative, religious small business owners. To ask a few questions about the election is to press the button on a vigorous debate revealing sophisticated and nuanced views on what is at stake. Firat Inci, a 32-year-old bazaar restaurateur originally from the southern town of Siirt, has always voted for the AKP and for Erdoğan. “He’s a fantastic person. You need to understand his background and what he has achieved. We used to have military coups every 10 years and Erdoğan pushed back 70 years of military domination.”

The leader of the pro-Kurdish Peoples’ Democratic party (HDP), Selahattin Demirtaş, speaks during an election rally in Istanbul. Photograph: Yasin Akgul/AFP/Getty Images

But, for the first time since he has been able to vote, Inci this time is opting for the opposition HDP, or People’s Democratic party, a new grouping of leftists and liberals mainly representing the large Kurdish minority that has always struggled to be represented in parliament. “Erdoğan’s attitude and behaviour make me uncomfortable,” he said. “He got drunk on power. And a presidential system won’t be good for Turkey.”

Sezgin Tanrikulu, a human rights lawyer and an MP for the main opposition CHP, or Republican People’s party, echoes the allegations of presidential megalomania. “They’re so glued to power that they could try anything to keep it. It’s a fixation. But they’re on the defensive.” To judge by his non-stop speechifying, Erdoğan views politics as a majoritarian blood sport in which the winner takes all, loyalty is rewarded and opposition denounced as treachery. It is a highly polarising approach, especially for a head of state who is supposed to preach inclusiveness.

He got drunk on power. And a presidential system won’t be good for Turkey. Firat Inci, restaurant owner

Kadir Karapinar, who co-owns a small shoemaking business in Istanbul’s bustling Beyoğlu district, criticises the reluctance to compromise.

“In Turkey, supporting a political party has become like supporting a football team. You can be either with one party or against them, but none really wants to be a party for everyone in Turkey.” The AKP and Erdoğan, he adds, use very divisive language to rally their base. “They still present themselves as victims. They say that anyone who votes against them wants to return to the Turkey of 15 years ago. But I have always defended the right of women to wear a headscarf, the right to practise one’s religion freely. If anyone is being victimised in Turkey today, it is those that criticise Erdoğan.”

After years of such aggressive rhetoric from Erdoğan, particularly following the protests that erupted in central Istanbul two years ago and spread like wildfire around the country, the president’s us-and-them narrative may be taking its toll. If half the country still adores him, the other half now seems to revile him. This is one reason that Nedim Şener, an investigative journalist jailed for a year in 2011 on terrorism charges that were then dropped, believes that Erdoğan’s presidential campaign will flop.

“Maybe Erdoğan wants this, but he can also see that it’s not possible. He is just using it to rally his support. It is too dangerous, there is a lot of tension, there could be clashes if you try to change the system. All opposition groups oppose constitutional change because it’s too important and it’s about Erdoğan and one-man rule. It’s become a symbol, like the palace in Ankara. The palace has become this hate object.”

The leader of Turkey’s main opposition Republican People’s party (CHP), Kemal Kılıçdaroğlu, addresses supporters in Ankara. Photograph: Adem Altan/AFP/Getty Images

A neo-classical presidency?

Even within the AKP, it is hard to discern support for an executive presidency. Senior figures are reluctant to challenge Erdoğan directly but have meekly voiced their reservations. A trio of senior critics – Erdoğan’s predecessor as president, a deputy prime minister, and the economics minister – are not running for parliamentary seats, however, and have less to lose by speaking out. There is no doubt that the AKP will win the election for a fourth consecutive term. The question concerns the margin of victory, with some polls putting the party at 41-45% of the vote. That would leave Erdoğan sulking in his vast palace and be seen as a defeat. “There is governing fatigue within and with the AK party,” says Şener.

But the key to the all-important parliamentary arithmetic is the new and unknown element of the HDP, mainly representing the Kurds but also bringing together younger civil libertarians born of the mass protests against Erdoğan’s overweening control in 2013. The HDP’s leader, Selahattin Demirtaş – young, telegenic, and persuasive – has been the surprise star of the campaign. But Turkey has one of the highest thresholds in the world for entering parliament. A party must get 10% of the vote nationally to qualify for seats. The HDP can win roundly in the Kurdish heartlands of the south-east and still fail to muster the national 10%. There are up to 70 seats at stake. Most of them will go to the AKP if the HDP fails to get in in Ankara. “The critical point is the HDP,” says Şener.

If the ruling AK party loses power, there will be no peace process left Yalçin Akdoğan, deputy prime minister

Karapinar is thinking about voting for the HDP, which is contesting its first election. “Demirtas is a very good politician, and I like the things he says. But what about the connections of his party? It is difficult for me and many Turks to support such a thing.” This is a reference to the HDP’s links with the PKK, the Kurdish guerrillas at war with the Turkish state for most of the past 30 years. Inci in the Grand Bazaar gives the HDP the benefit of the doubt over the PKK and will vote for the new party, which in the opinion polls is hovering around the 10% mark.

Tayyip Erdoğan marks Republic Day at the new presidential palace in Ankara last year. Photograph: Umit Bektas/Reuters

“We fully expect that there will be attempts at cheating,” said Ayşe Erdem, the HDP’s co-leader in Istanbul and an ethnic Turk. “The AKP has every reason to try and keep us under the threshold. But we are prepared. There will be someone with a smartphone at every ballot box.” If the HDP scrapes in, the ruling party’s majority could be imperilled and the presidential ambitions wrecked. But if the AKP gains the seats from an HDP failure, Erdoğan’s plans will be boosted. He has managed the referendum issue before. In his final term as prime minister, he pushed through and won a popular vote to make the president directly elected by the people. He then stood and won by more than 50%.

His supporters say there is no point in having a directly elected president unless the office is vested with executive powers. Erdoğan and the ruling party are playing the ethnic card, fanning fear among Turks that a pro-Kurdish party in parliament will spell the end of democracy, while also jeopardising the ongoing peace process between the Turkish government and the PKK. “We want to tell those who vote for the HDP: if the HDP gets over the threshold, if the ruling AK party loses power, there will be no peace process left,” the deputy prime minister, Yalçin Akdoğan, said. “This plan only aims to bring chaos to Turkey.”

In arguing for the constitutional changes, Erdoğan commonly invokes the US and French systems as inspiration. Çandar says this is misplaced. “It won’t be French or American, more like South American.” Erdem says: “We need to get the 70 MPs. That’s the only thing that will stop Erdoğan changing the constitution on his own. People are aware of that. This is about the democratisation of Turkey. It’s not about the system; it’s about Erdoğan. The presidential system would mean dictatorship.”