Turkey’s ruling Justice and Development Party (AKP) has been an outspoken advocate for the use of military force to overthrow Syrian President Bashar al-Assad. Since severing ties with the Syrian regime in September 2011, Ankara has been a critical provider of military and humanitarian aid for a host of rebel groups operating throughout northern Syria.

Until now, AKP has managed to resist any changes to its policy owing to its outsize and repeated victories at the polls—even as the Syria conflict has spilled over the border in the form of terrorist attacks, lethal artillery fire, and downed Turkish aircraft. A driving force behind AKP decision-making has been the fear of seeing a semiautonomous Kurdish region spring up in Syria’s ungoverned north; specifically one ruled by the dominant, far-leftist Democratic Union Party (PYD).

Ironically, by trying to keep the PYD at bay, Turkish President Recep Tayyip Erdogan undercut his personal appeal in Turkey’s Kurdish majority southeast and undermined his former party’s efforts to continue to attract support from religiously-minded Kurds. This key constituency defected from the AKP in this past election, choosing instead to vote for Turkey’s fourth largest political party, the Peoples’ Democratic Party (HDP).

The HDP and the PYD are linked to the Kurdistan Workers’ Party (PKK), which has been fighting an on-and-off again insurgent war against the Turkish state since 1984. Both Ankara and Washington consider the PKK a terrorist organization, although the former has participated in peace talks with it, also on-and-off again, for years. The HDP came in third at the ballot box on Sunday. The party’s success prevented the AKP from winning enough seats tor form a government, forcing the party’s leader, Prime Minister Ahmet Davutoglu, to wrestle with the idea of coalition politics. The HDP’s success also thwarted the Erdogan-backed AKP pledge to change Turkey’s constitution and create an executive presidency—a move that Erdogan has been in support of since at least 2011, ostensibly to make Turkey more efficient by lessening restrictions on the head of state.

The HDP’s success mirrors that of its political cousins in northern Syria, the PYD. Since the summer of 2012, the PYD has assumed control of three non-contiguous areas—Afrin, Kobane, and Jazira—following Assad’s withdrawal of forces. The PYD’s military success prompted Ankara to adopt a policy of political and economic isolation, wherein the border gates with these three cantons were kept closed, despite the permissive cross-border policy adopted for other Arab-majority areas.

In November 2012, the PYD accused Turkey of supporting a number of rebel groups, including the then-recently formed Jabhat al-Nusra, the official al Qaeda affiliate in Syria, during an offensive against PYD strongholds. Turkey’s reported support for these groups, combined with Kurdish complaints about Ankara’s lax border policy during this period, ultimately birthed the now-widely held belief among the region’s Kurds that Ankara supports Islamist rebels, including Nusra and its ideological cousin, the Islamic State.

This perception has since become fact in much of Turkey’s southeast. Most Kurds now take it for granted that “Ankara supports IS,” a view that only deepened during the Islamic State’s siege of Kobane in fall 2014. During the siege, Ankara surged tanks to the border to contain spillover and to ensure that IS- and PYD-affiliated militants did not seek to take advantage of the situation to attack Turkish targets. The imagery of Turkish tanks parked on the hill overlooking the besieged town while PYD fighters and American and Arab jets bombed IS deepened Kurdish feelings of resentment toward the AKP and confirmed for many the idea that the AKP is using IS to attack the PYD to prevent Kurdish autonomy.

The intense media coverage of the battle—where the PYD’s fighters were portrayed as freedom-loving combatants, rather than “terrorists” linked to the PKK—was deeply unsettling for Ankara and prompted Erdogan to gripe about the fixation on Kobane at the expense of other parts of Syria, where Assad’s daily aerial bombardment of Turkish-backed rebel brigades failed to attract the world’s attention.

Erdogan, at one point in October, suggested that the U.S.-led air campaign should target both the regime and ISIS, rather than just the latter. But none of his comments distracted from the more powerful reality of the spectacle of hundreds of funerals for Kurdish fighters from Turkey taking place multiple times a week in Kurdish villages in the southeast. The funerals helped to further galvanize support for the HDP, owing to the group’s local presence, its assistance with the funerals, and links local politicians had with many of the slain fighters.

The PYD’s ultimate defeat of the Islamic State in Kobane galvanized pan-Kurdish sentiment throughout the region, particularly in Turkey’s Kurdish majority border areas where thousands of Kurdish refugees have taken shelter. It also resulted in upward political pressure being placed upon the HDP: The party now has 81 seats in Turkey’s parliament. The region’s Kurds are now looking to its charismatic leader Selahattin Demirtas to challenge the AKP on its Syria policy. Yet, despite the party’s electoral success, it will struggle to dramatically alter the AKP’s Syria policy.

The HDP does not have the votes to make policy, or change laws independently. It has also made clear that it does not intend to join in a political coalition with the AKP. This leaves the HDP with few means with which to change policy, outside of raising controversial aspects of the AKP’s policy publicly in the Parliament. In doing so, the HDP is certain to act as a traditional opposition party, and perhaps force changes through the naming and shaming of some of the questionable aspects of Ankara’s Syria policy.

In doing so the HDP will also have to be mindful of appearing overly sympathetic to the PYD. While the bulk of the HDP’s support still comes from Turkey’s Kurds, it has successfully created the image that Demirtas has wide and cross-ethnic appeal. A Kurdish-focused HDP will undermine this narrative, strengthen the Turkish nationalist right, and potentially undo its electoral gains. The HDP, like every other Turkish opposition party, is vehemently opposed to Turkish military action in Syria, which means that the AKP would fail should it go to Parliament to receive permission for a large-scale cross-border military intervention. Thus, while Turkish politicians have floated the idea that it could introduce ground troops in a U.S.-protected northern Syrian buffer zone, the parliamentary dynamics suggest that such a proposal would be dead in the water.

Added to this is Turkey’s forthcoming electoral turbulence. For at least the next two months, political parties will focus intently on coalition negotiations. Foreign policy, if it comes up at all, will be used as a populist issue, designed to one-up potential political rivals. And if coalition negotiations fail, the country will then enter into another election cycle, which would allow for the AKP to retain its strong influence over the direction of Turkey’s foreign policy.

This means the AKP will continue to play the dominant role in the formulation of the country’s Syria policy in the near term. Further still, the core elite in charge of the AKP’s Syria policy remain in place, and are largely comprised of unelected bureaucrats acting at behest of President Erdogan and Prime Minister Davutoglu. While Erdogan may choose to replace Davutoglu, it is unlikely that any of the potential candidates will dramatically break with the AKP’s policy—especially now that Turkish-backed rebel groups are on the march in Idlib.

Thus, while HDP outperformed the AKP with Kurdish voters, its success may not actually result in much difference to the direction of Turkey’s Syria policy. These dynamics suggest maintenance of the status quo, albeit with more details about Ankara’s actions in Syria being aired in Parliament. Ankara is thus likely to continue to arm rebel factions and provided cross-border aid, but these activities are unlikely to stay secret for very long. This could make life difficult for the AKP, but its top leadership remains committed to the overthrow of Bashar al-Assad, both as a means to end the Syrian conflict and as a longer-term effort to enact key elements of its foreign policy.