CNN  — 

President Barack Obama rejected on Friday suggestions the US was behind a failed coup in Turkey, voicing strong support for the government in Ankara and Turkish President Recep Tayyip Erdogan.

“Any reports that we had any previous knowledge of a coup attempt, that there was any US involvement in it, that we were anything other than entirely supportive of Turkish democracy, are completely false, unequivocally false,” Obama said at the White House during a joint news conference with Mexico’s President.

Obama faces a delicate balance in his response to the attempted overthrow of Erdogan’s government. Friday marked Obama’s first public comments on the coup attempt, which fizzled at the end of last week. He phoned Erdogan on Tuesday as the Turkish government began a crackdown on suspected coup plotters.

Obama called for government restraint, but his remarks were carefully calibrated. He said it was hard for Americans to understand how fearful Turkish citizens were in the aftermath of the coup attempt.

“We can’t discount how scary and shaken not just the Turkish government is, but Turkish society is,” he said. “Imagine if you had some group of military officials here in the United States who started flying off with F-16s or other artillery and were taking shots at government buildings, and people were killed and injured. People would be scared and rightfully so.”

The US relies heavily on Turkey in its efforts against ISIS, also known as ISIL and Daesh, including through its use of the Incirlik air base in southern Turkey. The cooperation was hard-won after lengthy negotiations with Erdogan’s government. In the days following the coup attempt, power was shut off to the base. But Obama said Friday operations were up and running.

“We will continue to work with Turkey even as they try to stabilize the situation. Our base at Incirlik, from which we are going after ISIL hard, is up and running again, and we continue to work with them to make sure that we don’t lose momentum that we’ve built,” Obama said.

Turkey’s ambassador to the US, Serdar Kılıç, delivered a similar message to reporters in Washington Friday.

“The joint effort in the coalition against Daesh and other terrorist organizations is not going to be affected negatively in any way. That is for sure,”

When asked about allegations that the US might have been involved in the coup, Kılıç said, “Given the close relations between Turkey and the United States, I hope not.”

But the tenuous partnership could be further shaken by Turkey’s demands that the US extradite cleric Fethullah Gulen, who Erdogan accuses of helping plot the coup.

Obama said that “a legal process” remained before the federal government would do so.

“What I said to President Erdogan is the same thing I would say to you and anybody else who asks, which is that we have a process here in the United States for dealing with extradition requests made by foreign governments, and it’s governed by treaties and by laws, and it’s not a decision that I make,” Obama said.

Obama called on Erdogan to respect the rule of law in responding to those who attempted to overthrow his government.

“One of the challenges of a democratic government is making sure that even in the midst of emergencies and passions, we make sure that rule of law and the basic precepts of justice and liberty prevail,” Obama said.

The US and Turkey cooperate closely on several sensitive global issues, top among them the fight against ISIS in nearby Syria and Iraq. Turkey’s Incirlik Air Base is a key point of departure for US airstrikes and drone operations, and as the power outage following the coup continued, Pentagon officials began to express concern about keeping up the pace of missions relying on power supplied from a generator.

Incirlik’s power was cut off Saturday as Turkish authorities sought to detain military officers complicit in the failed coup attempt on July 15. The commander of the Turkish side of the base was arrested as part of the following crackdown.

While operations against ISIS, also known as ISIL, were briefly halted when Turkish official closed the airspace around the base, US forces were able to resume activity by relying on backup generator power once the airspace was reopened.

Incirlik’s location just 60 miles from the Syrian border to ISIS-held territory makes it a critical installation, allowing attack planes and surveillance aircraft to operate without having to conduct expensive and complicated air-to-air refueling operations.

That backup measure will remain available for use in case of a future interruption, according to the statement on the restoration of power.

Secretary of Defense Ash Cater told reporters Thursday in Washington that his Turkish counterpart had assured him that operations at Incirlik would be returning to normal.

Some analysts think that the US was hesitant to criticize Turkey too strongly for its crackdowns on judges, teachers and military officers following the putsch out of fear that the US might lose access to Incirlik.

Kurt Volker, former US Ambassador to NATO, told CNN that Turkey surrounded and shut down the base’s power initially in an effort to root out coup-plotters but that the continued power cut could have been an attempt by Turkey to “show the US that they have leverage if they needed.”

CNN’s Elise Labott contributed to this story.