The defeat of a coup attempt launched by a faction of Turkey’s military has left relations between the United States and one of its most important allies in a state of uncertainty.

President Obama called together his national security team for an unusual Saturday morning meeting to discuss events in Turkey and immediately followed it up with a conference call with foreign policy advisers.

Senior Obama administration officials strongly condemned the effort by the renegade military faction to seize power in Turkey, and the coup’s failure was greeted with profound relief inside the White House and the Pentagon. The U.S. government depends heavily on Turkey’s support to sustain its battle against the Islamic State and to provide a safe harbor for thousands of migrants fleeing Syria.

“It looks like the nightmare scenario has been avoided,” said Ilan Goldenberg, a former senior Pentagon official and specialist on the Middle East for the Center for a New American Security. “But Turkey is going to remain really unstable and concerned with its own military machinations.”

More than 100 coup plotters along with more than 160 civilians and police officers were killed in the aftermath of Thursday’s chaos as ordinary Turks poured into the streets to prevent the military takeover. President Recep Tayyip Erdogan, appearing in Istanbul, blamed the followers of Fethullah Gulen, a Muslim cleric living in exile in Pennsylvania, for the unrest.

Rogue officers of Turkey’s military declared martial law and attempted to overthrow the government of President Recep Tayyip Erdogan overnight, but Erdogan a few hours later said his government is in control. (Jason Aldag/The Washington Post)

“I have a message for Pennsylvania: You have engaged in enough treason against this nation,” Erdogan said. “If you dare, come back to your country.”

The coup attempt is likely to heighten tensions between Turkey and the United States, which has increasingly worried about Erdogan’s consolidating power and cracking down on opposition leaders inside Turkey. “It is hard to see how the outcome of this will be more democracy,” said Derek Chollet, a former senior White House official and author of “The Long Game,” a book about Obama’s foreign policy. “The relationship with Turkey is only going to get more complicated.”

Erdogan has long criticized the United States for allowing Gulen, who he thought was plotting against him, to live in Pennsylvania. “He has been obsessed with the Gulenists for years,” Chollet said. “I have been in meetings where he’s spent more time talking about them than the threat from the Islamic State.”

Gulen denied being involved in the coup attempt. He called Erdogan’s allegations an insult and told reporters for the Guardian and other media outlets on Saturday that the coup attempt might have been “staged” by the Turkish government. Secretary of State John F. Kerry said the United States was willing to consider requests from Turkey to extradite Gulen so that he could stand trial.

“Obviously, we would invite the government of Turkey, as we always do, to present us with any legitimate evidence that withstands scrutiny,” Kerry said. “And the United States will accept that and look at it and make judgments about it appropriately.”

A refusal by the United States to send Gulen home to Turkey would probably complicate the White House’s already-tense relationship with the Erdogan government. After the coup attempt, the Turkish government closed air operations at Incirlik Air Base, a critical hub for U.S. fighter jets and drones striking targets in northern Iraq and Syria. The Pentagon said Saturday that it was working with the Turks to resume air operations there as quickly as possible.

U.S. Secretary of State John Kerry says the U.S. "without any hesitation, squarely and unequivocally, stands for democratic leadership" in Turkey. (Reuters)

U.S. and Turkish officials spent months haggling over American access to Incirlik for the war in Iraq and Syria before Erdogan relented. It was still unclear on Saturday whether the shutdown in operations was part of an effort to round up elements involved in the coup or whether it was designed to send a signal to the United States.

U.S. officials received initial reports, including some coming from Turkish officials, that the military’s actions Thursday night were taken in response to an imminent threat inside Turkey. Those reports appear to have been false.

Once it became clear that a coup was underway, the White House sought to send a rapid and unambiguous message that it condemned the plotters’ actions.

The quick condemnation is likely to help smooth relations with Erdogan, whom U.S. officials have described as complicated, paranoid and unpredictable.

“Erdogan is going to come out of this more paranoid and more authoritarian,” said Goldenberg. “But does he blame the United States? That’s the million-dollar question. This really is a country run by one man.”

It is also unclear how the Turkish military will respond and operate in the months to come. The United States has pressed the Turks to shut down their border with Syria in an attempt to stop the Islamic State from bringing in critical supplies and bolstering its ranks. The coup attempt and efforts by Erdogan to purge the top ranks of plotters are likely to complicate the military’s border operations.

In the days prior to the coup, Obama was able to win Erdogan’s reluctant support for a military push by a largely Kurdish Syrian force to clear the Islamic State from villages that span a 60-mile stretch of the Syria-Turkey border.

The Turks, fearing that the Kurds would use the operation to establish a state in northern Syria, had previously opposed it. The stretch of border near the Syrian town of Manbij is the last piece of territory that the Islamic State controls in the area and is critical to the militant group’s survival. Tense relations with Erdogan could delay operations to seize that key terrain.

“I think the whole mess has to affect the timeline,” said Andrew Tabler, a fellow at the Washington Institute for Near East Policy who focuses on Syria. “We don’t know if any of this will affect the hard bargain the U.S. struck with Erdogan.”