Turkey's general election looks likely to push Tayyip Erdogan's dream of an all-powerful presidency further from his reach, and usher in a period of turbulence as its most divisive modern leader jockeys to maintain his dominance.
Barred by the constitution from party politics as head of state, Erdogan has nonetheless campaigned across Turkey before the June 7 parliamentary vote in a sign of how much he has riding on the outcome.
"You will not take me away from these stages, you will not silence me," he told a rally in the central city of Kirikkale this month, explaining why the presidency should get greater powers.
Constitutionally, most authority has lain with the Turkish prime minister, an office Erdogan held from 2003 to 2014. But since becoming head of state last year, he has pushed hard for an executive presidency akin to the United States or France.
However, the AK Party which he founded looks unlikely to win two thirds of the seats in parliament, the majority needed to change the constitution without putting the plan to a referendum.
A referendum is also beset by problems. The Kurdish opposition, once seen as a possible ally on a new constitution if it also boosted Kurdish rights, has come out against a stronger presidency.
Erdogan's polarizing style of leadership, which alienates those Turks who are suspicious of his conservative Islamic ideals, means he is unlikely to persuade the secularist opposition CHP or the nationalist MHP to back his plans in a popular vote.
The election has therefore taken on almost existential importance for Erdogan, who has tightened his grip on the judiciary, police and media in recent years. Should the AKP's majority weaken, the aftermath will be marked by his struggle to keep control.
"Erdogan is aware that every passing day his power is being eroded, that's why he is pushing so hard for the presidential system," said Sinan Ulgen, head of the Istanbul-based EDAM think-tank and a visiting scholar with Carnegie Europe.
"What empowers him is the existence of that prospect. Once that is no longer realistic, the balance of power will start to turn against him."
Erdogan is a political fighter hardened by a childhood in Istanbul's rough Kasimpasa district and a champion of Turkey's religious working classes. As such, he is unlikely to sit back and watch influence slip from his hands.
In the past two years alone, he has seen off mass protests and a corruption scandal, either of which might have brought a lesser politician down. He bounced back to win the presidency last August with 52 percent of the vote.
The AKP is putting on a united face for the election next month, but his intrusion in what should be the prime minister's responsibilities – Erdogan has chaired several cabinet meetings and gets involved in detailed government affairs – is already creating tensions.
"Erdogan is the leader of this movement. Those in the AK Party know this very well … But bit by bit, some have started to feel uncomfortable about his persistence on the executive presidency," said one senior source close to the party.
"There are people who are open to the president's directions, but not his closeness to the everyday flow."
A number of senior AKP figures, barred from standing for re-election in parliament under the party's three-term limit, are expected to assume roles as presidential advisers in Erdogan's vast new palace complex. Some officials are already privately calling it a "shadow cabinet" and fear a struggle for influence with Prime Minister Ahmet Davutoglu's team.
A source in Erdogan's office played down that risk.
"This is not personal and not something he wants for himself. He has thought there were serious problems with the parliamentary system since he started in politics, and he wants to find a solution," the source said.
"He doesn't view it as a step against Davutoglu."
Erdogan's rhetoric and common touch nonetheless give him the upper hand with the party grass roots, where he commands the sort of devotion that Davutoglu, a more reserved academic, has yet to achieve.
Some supporters at Erdogan rallies have worn death shrouds to symbolize their willingness to die for him. In a video that went viral on social media, one said he liked Erdogan so much he wanted to bite and lick him. "He's a lion. My baby," the man said.
Over-confidence and paranoia
Erdogan bristles at accusations of authoritarianism and was once seen in the West as a model Muslim democrat. As prime minister he established civilian dominance over a military that had forced out Turkey's first Islamist-led government in 1997 and had staged three outright coups in the second half of the 20th century.
He also oversaw Turkey's opening up to new trade markets and reforms aimed at closer integration with the European Union, as well as a peace process with Kurdish militants.
But Turkey's democratic credentials have suffered as he tightened his grip. Court cases have been opened against those accused of insulting Erdogan, including a 16-year old high school student, and Twitter and Facebook have periodically been blocked.
Thousands of police officers and prosecutors were reassigned after the 2013 corruption scandal involving his inner circle. Erdogan blamed the "parallel state", a term he uses for the network of US-based cleric Fethullah Gulen, a former ally who Erdogan says unlawfully exerts control over followers within institutions including the police and judiciary.
Ekrem Dumanli, editor-in-chief of the Zaman newspaper which is close to Gulen, said over-confidence after a 2010 referendum in which government-backed changes to the constitution won 58 percent support was the beginning of a change in Erdogan.
Mass protests at home in the summer of 2013 and the overthrow a few months later of Egyptian president Mohamed Morsi, whose Muslim Brotherhood has close ties with the AKP, then fueled a sense of paranoia, Dumanli said.
The smart-suited editor was once so close to Erdogan that he was asked to write the script of a film portrayal of the leader. Now, Dumanli is pending trial on accusations of belonging to a terrorist group for his links to Gulen.
"He lost just when he was winning," Dumanli said. "A more pluralistic, participatory democracy would have made him a hero in the Middle East."