President Obama met with Turkish Prime Minister Recep Tayyip Erdogan earlier this week to discuss, among other things, Syria, free speech, and the excessive police tactics the regime used to quell recent protests against Erdogan’s policies. Violent clashes between protesters and security forces have already resulted in 24 arrests and four deaths. Protesters, after being cleared out of Istanbul’s Taksim Square and Gezi Park, changed their tactics and joined the silent protestor, “Standing Man,” in a vigil outside the cultural center near Taksim Square, facing a picture of the country’s inspirational former leader, Kemal Ataturk. But, as The Heritage Foundation’s Kim Holmes explains, Erdogan’s response has been increasingly authoritarian, raising ever more questions about his commitment to democracy and the rule of law.

The demonstrations began in late May with a small group of environmentalists protesting the planned demolition of Gezi Park, the last green space in urban Istanbul. The demonstrations have evolved to include Turks of every ideology, from those opposing the widespread urbanization of Turkey under Erdogan, to socialists who spurn his pro-business reforms, and secular liberals opposing his conservative brand of Islam and its increasing codification into law—most recently exemplified by his move to restrict alcohol sales. These complaints come in addition to other long-standing heavy-handed actions, such as the imprisonment of more journalists than any other country in 2012.

Yet Erdogan has made important economic reforms that have greatly benefitted Turkey, with growth averaging over 5 percent annually since he took office in 2003. However, his commitment to economic freedom is limited, and excessive bureaucratic hurdles to investment and a constantly changing regulatory and legal environment are slowing growth. In addition, there is widespread political corruption, and judges are often influenced to make decisions favorable to the government.

Western allies should also be concerned with Turkey’s foreign policy agenda. It has expressed support for Hamas, and supports Islamist rebels in Syria. As Holmes puts it, “Erdogan wants to carve out a bigger role for Turkey in [the Middle East], recreating a neo-Ottoman foreign policy that hovers somewhere between the Muslim and western worlds.”

Turkey’s actions should be an indicator that nurturing secular democracy in the Middle East travels a hard road. With Erdogan striving for independence from the West and more influence in the region, it is unclear how Turkey can be relied upon as an ally. In order to maintain a strong alliance with Turkey, President Obama needs greater cooperation from Erdogan on regional issues. Regarding the civil war in Syria, he should push Erdogan to support the primarily secular and nationalist Free Syrian Army, instead of the Islamist-dominated Syrian National Council. As Heritage analyst Jim Phillips explains, this would increase support for the opposition, and encourage “an upsurge in defections from Christian, Druze, and Alawite supporters of the regime who fear sectarian vengeance attacks from the Muslim Brotherhood and other Islamists.” This additional support for the rebels could hasten the Assad regime’s fall.

Turkey is indeed key to achieving peace in the Middle East. President Obama should make sure he and Erdogan are on the same page about what peace should look like before throwing his unqualified support behind a leader whose commitments to liberty and the rule of law are wavering.