Consider Turkey, a rising economic power in the Middle East that seemed destined until recently to become the region’s sole Muslim democracy. During his first term in office, Prime Minister Recep Tayyip Erdogan relaxed some restrictions on Kurdish minorities and passed reforms that aligned the country’s legal regime with European norms.