In just over two months time, Turks will go to the polls for the second time this year. In June they deprived the ruling Justice and Development Party (AKP) of President Recep Tayyip Erdogan of the overall majority it had enjoyed for 13 years. In doing do they also robbed the president and former prime minister of the legislative opportunity to change the constitution, giving wide-ranging executive powers to the presidency. Such powers would have fitted in well with the immense, thousand-room palace that Erdogan had built to house himself and his successors. Erdogan's former foreign minister and now Turkish premier, Ahmet Davutoglu, failed to form a coalition government with rival parties. The Republican People's Party (CHP) and the Nationalist Movement Party (MHP) were probably never intent on working with the AKP. The fourth political group, the pro-Kurdish People's Democratic Party (HDP), said from the outset that it would not enter into any government with the AKP. This was hardly surprising since the HDP, which won 80 seats in the 550-seat parliament, drew support across the community from people who had had enough of the high and mighty Erdogan. It was also clear that HDP voters were concerned at AKP rule becoming entrenched. It is popularly believed that Erdogan never wanted Davutoglu to put together a coalition. It is even being said by rival politicians that the Turkish prime minister did not try all that hard anyway. The president is clearly counting on a return of AKP voters who deserted the party in the summer. Opinion polls seem to show a modest increase in AKP support. But nothing indicates that the moderate Islamic party will restore its overwhelming mandate. Even if it gets a majority, it seems highly improbable that AKP will acquire the three fifths of the seats in parliament necessary to make any constitutional changes. Erdogan is clearly prepared to take the risk that opposition parties will take more seats. He will target seats which the party lost only narrowly. He will encourage the bitter rivalry between the CHP and the Nationalists, who could have used electoral pacts to unseat more AKP legislators in June. But most of all Erdogan will turn his fire on the HDP and its charismatic leader Selahattin Demirtas. There will doubtless be attempts to implicate the party in the current PKK violence even though Demirtas has been loud in denouncing PKK attacks. In foreign policy terms, the election is happening at one of the most delicate times in Turkey's modern history. Discredited for its support for the Muslim Brotherhood, criticized for its longstanding ambivalence toward the terrorists of Daesh (the self-proclaimed IS) and back in a shooting war with the Kurds of the PKK, Erdogan and Davutoglu have opened a thick portfolio of challenges. These will have to be tackled by whatever government emerges after November 1. Turkey's electorate has demonstrated it has the sophistication to be concerned at an increasingly autocratic leader who appeared to assume that political power was his by right. If the result of November's election is indeed another hung parliament, it will be the turn of Turkish politicians to demonstrate their sophistication by forming a coalition government that works for the sake of the whole country rather than any particular constituency.