Turkey’s electorate has voted for democracy and the rule of law over incipient dictatorship, a most positive development. In the June 7 parliamentary elections, the Islamist Justice and Development Party (AKP) was abandoned by many voters. The ruling party won the largest bloc of seats in parliament, but lost the majority.

President Recep Tayyip Erdoğan has become increasingly controversial. Thanks to party-imposed term limits, the long-time prime minister moved to the largely ceremonial post of president. Aggressive moves to strengthen the office have sparked a significant backlash.

The Peoples’ Democratic Party (HDP), directly representing the Kurd population, broke through to win 80 legislative seats. Previously, Kurds have run for parliament on independent lists. Kurdish separatism is a continuing source of friction in Turkey.

The AKP, strongly rooted in the religion of Islam, has governed Turkey since 2002. This has complicated relations with the U.S. and Europe, but alliance has survived. Last year, Ambassador Ismail Aramaz of Turkey was named senior NATO civilian representative in Afghanistan.

Observers in Europe and the U.S. have focused on signs of Islamic extremism in Turkey. Terrorist efforts in Europe since 9/11 have reinforced such anxiety.

Turkey’s relative isolation within Europe adds to concern. The European Union has turned the nation’s application for membership into an ordeal. No doubt concern about Islamic extremism contributes to caution.

In fact, Turkish developments in important respects have been reassuring. The latest election confirms commitment to representative government. To date, terrorist strikes in the country have boomeranged, with considerable hostility toward perpetrators of these criminal acts.

There is anxiety about domestic military intervention, but the AKP has operated carefully to avoid takeover by the generals To be sure, tensions and some serious controversies have arisen with the military, but so far coexistence has continued. There has been no repeat of the military takeovers of earlier periods. The military overall is more restricted.

Since the revolution in the 1920s led by Mustafa Kemal Ataturk, Turkey has been constitutionally strictly secular. The army serves as watchdog to keep religion at bay. Four times in the past half century, the generals have acted. Past military intervention at times was bloody.

Turkey’s geostrategic importance should be overriding for policymakers in the U.S. and other nations. Turkey commands sea and land routes, including the Strait of Bosporus, for shipping oil, gas and other important commodities. Governments in Ankara have in the past worked effectively with Israel, and current strains combine with some hopeful developments.

Ankara-Washington cooperation is strongly rooted. Turkey has been actively engaged in Afghanistan throughout the U.N. and NATO occupation. During the first Gulf War, U.S. B-52 bombers were deployed on Turkish soil, a potentially risky move by Ankara. Turkey played a vital Allied role during the Korean War; the U.N. military cemetery at Pusan contains a large number of Turkish graves.

Germany and Turkey are traditional allies. Today, encouraging partnership makes sense. Germany’s influence steadily grows in not only Europe but also Russia and Central Asia. That is a great plus for regional and international stability.

The rise of ISIS and continuing Syria civil war add to Turkey’s pivotal roles. Syrian refugees streaming into Turkey have provided a major challenge, overall handled humanely by Ankara.

Turkey’s election results mean a period of jockeying among the political parties for a new governing coalition. There may also be another election soon. That adds to short-term uncertainty but long-term stability.

Arthur I. Cyr is Clausen Distinguished Professor at Carthage College and author of “After the Cold War” (NYU Press and Palgrave/Macmillan). He can be reached at acyr@carthage.edu.