Turkey was convulsed by the recent attempted coup. Nominally democratic but in practice increasingly authoritarian, the government of President Recep Tayyip Erdogan has initiated a broad crackdown that goes well beyond the military. He has the makings of becoming another Vladimir Putin--except supposedly on America's side, but even that is up for debate.

Turkey's dubious evolution should remind Americans how hard it is for U.S. officials to play social engineers to the world. Instead of constantly meddling in hopes of "fixing" other nations, Washington should step back when its interests are not vitally affected, which is most of the time. The physicians' injunction, "First do no harm," would be a good principle for American foreign policy.

Ankara joined NATO during the Cold War. The U.S. was not much concerned about whether Turkey was a democracy. Washington wanted to secure the Balkans and project U.S. power into the Middle East. Containment of the Evil Empire was the principal objective.

That policy should have expired with the collapse of the Soviet Union and dissolution of the Warsaw Pact. Friendship rather than alliance should have become America's objective. By then Turkey was nominally a parliamentary democracy, but the military still wielded extraordinary power, overthrowing an elected government as late as 1997.

Unfortunately, Washington decided to use its new "unipower" status to attempt to micro-manage the Middle East. Consecutive administrations launched a succession of ill-considered interventions.

The George H.W. Bush administration's first Gulf War was followed by constant bombing of Iraq throughout the Clinton administration. George W. Bush initiated two wars and ended up nation-building for years in both Afghanistan and Iraq.

The Obama administration added Libya, the anti-ISIS campaign in Iraq and Syria, aid to Syrian insurgents, support for Saudi Arabia's attack on Yemen, and drone campaigns in Pakistan and Yemen. Washington oft relied on bases in Turkey. The one time Ankara said no, in 2003, America's deputy defense secretary suggested that the military straighten out the civilian government.

However, Erdogan transformed Turkish politics. He started as a reformer and won support in the U.S. and Europe. They looked at Turkey as the model of a moderate, democratic Islamic state.

President Barack Obama even visited Turkey, where he lectured the European Union on why that organization should include Ankara. One can, of course, imagine the American reaction if the German chancellor visited Mexico and urged Washington to inaugurate a North American Union.

But around 2010 the Turkish experiment began to go sour. Erdogan dropped his liberal veneer. He seemed to mutate into a corrupt and authoritarian throwback to Turkey's seamy past. He also pushed a more fundamentalist Islam into the public sphere. He did not react well to criticism from his one-time friends in America and Europe.

Erdogan also went AWOL on foreign policy. In an apparent fit of personal pique he decided he wanted to overthrow his former ally, Syrian President Bashar al-Assad, and sought to drag the U.S. into that conflict. But until recently Erdogan turned a blind eye to the Islamic State's use of Turkey as a base and transit route to Syria.

Then last fall Ankara risked a confrontation with Russia, shooting down one of the latter's warplanes for briefly violating Turkish airspace. Erdogan recently decided to repair that relationship. Washington found itself uncomfortably tied to his increasingly erratic and repressive role.

Although the U.S. opposed the putsch and backed Erdogan as the legitimately elected president, conspiracy theories involving Washington were rife in Turkey. The labor secretary charged: "The U.S. is behind the coup." America had intervened so long in Turkish affairs that some Turks couldn't believe it wasn't doing so again. Secretary of State John Kerry rushed to show America's support.

The U.S.-Turkey relationship shows how hard it is to stop meddling once you start. Washington is constantly (and usually futilely) involved, attempting to reshape the Mideast. That requires Turkish assistance. Which in turn requires friendship with whatever government is in power, no matter how antithetical to U.S. values.

Which leads to suspicions about American against the regime. Which requires a fervent show of support in response. Which ...

Washington should not be isolated from the world, but it should stop attempting to forcibly transform the world. In Turkey the U.S. has found itself forced to embrace a man who cannot be trusted to support people's liberty at home or fight Islamic radicalism abroad. So why is America still supporting him?