The recent public row between Deputy Prime Minister Bulent Arinc and Ankara Mayor Melih Gokcek marked the latest fallout from a widening rift between the country’s president, Recep Tayyip Erdogan, and his handpicked prime minister, Ahmet Davutoglu. If the crack continues to widen, it will not only deal a blow to Erdogan’s presidential dream but also to the future of the ruling party.

The spat between the two senior members of the Justice and Development Party (AKP) erupted after Erdogan publicly criticized the government’s handling of the Kurdish peace process. Three weeks after the government and the pro-Kurdish People’s Democratic Party (HDP) agreed on a road map to solve the Kurdish question, Erdogan , “There is no Kurdish problem in Turkey” and urged the government not to take any steps in the peace process unless the Kurdistan Workers’ Party (the PKK) lays down its weapons.

According to Turkey’s constitution, the prime minister is the chief executive and head of government, while the president is the nonpartisan head of state. In response to Erdogan’s criticism and U-turn on the peace process, his longtime deputy, Arinc, asked him to stop interfering. “We love our president,” Arinc on March 22. “We’re aware of his power and the good service he gives to our nation. But there is a government in this country." Gokcek, a staunch Erdogan supporter, asked Arinc to resign. Arinc hit back by accusing Gokcek of corruption.

The tension in the top echelons of the party over who should rule the country has been brewing for some time. In January, Davutoglu drafted a transparency package designed to battle misconduct and fraud in public institutions in an attempt to cleanse the party of the corruption of the Erdogan era. Erdogan then publicly the bill, arguing that the timing of the package was bad as it should not be presented ahead of the general elections.

Another public rift occurred in early February. After having received Davutoglu’s blessing, Hakan Fidan, Turkey’s intelligence chief and a close confidant of Erdogan, resigned his post to run for parliament—against Erdogan’s wishes. When Davutoglu failed to convince Erdogan, Fidan withdrew his candidacy and was as head of intelligence by Davutoglu.

Erdogan’s interference in Turkey’s financial sector has been another point of contention. Erdogan criticized the Central Bank for not lowering its interest rates, going so far as to Bank Governor Erdem Basci of “high treason.” Erdogan’s meddling led to a downward turn for the Turkish lira and declining investor confidence—already seen in a decrease in foreign investments. A frustrated Davutoglu rushed to New York, where he met with heads of key monetary and financial institutions to reassure them that the Central Bank was independent.

Erdogan is shooting himself in the foot, as his intrusions are undermining his handpicked successor and thus his presidential dreams. Almost 77 percent of the Turkish public the presidential system. Davutoglu must therefore capture a two-thirds majority in parliament to make the necessary constitutional changes to switch the country to the presidential system without going to referendum. This task—already challenging—has become increasingly difficult for a prime minister who has been unable to influence policymaking due to Erdogan’s heavy hand.

The public, including many within the AKP base, is also critical of Erdogan’s interference in financial decisions. Sixty-eight percent of the Turkish population that the Central Bank should make decisions based on the realities of the economy, while only 17 percent believes it should make decisions in line with Erdogan’s instructions.

Erdogan’s backpedaling on the Kurdish peace process is likely to pose further challenges for the ruling party in the upcoming elections. The president’s move is an attempt to court nationalist votes, but it might backfire. His increasingly nationalist rhetoric may cost him Kurdish votes and help the HDP’s quest to cross the ten percent electoral threshold, making Erdogan’s dream of a parliamentary supermajority almost impossible.

The AKP has ridden on robust economic growth, democratic reforms, and stability since it came to power in 2002. Erdogan’s actions seem to be undoing these achievements. Pro-AKP columnist Abdulkadir Selvi recently the mood within pro-government circles:

The tensions that the AK Party has experienced during the last three months are unlike anything the party had experienced since it was founded…The AK Party had managed to be a party that did not burden the public with its internal discussions. Indeed it was this trait that inspired the confidence of the society. The AK Party’s most important trait was that it did not spring crisis on this nation like the parties in government had done before it. But I have to confess that the recent events have started to create questions in the mind of the people. They make people wonder what is going on: The discussions between the president and the central bank; the Hakan Fidan incident; and most recently the discussions about the solution process. The AK Party had a spell. The masses preferred the AK Party because it was the symbol of stability. This spell is being broken.

Several public opinion polls point to a in AKP support. If Erdogan does not change course, he might be able to do the unthinkable since 2002: divide the AKP and deal a blow to its prospects of unchallenged victory.