Updated

President Obama on Sunday met with Turkish President Recep Tayyip Erdogan for the first time since a midsummer coup by dissidents failed to topple Ankara's government and strained already-troubled U.S.-Turkish relations.

Erdogan believes the effort to topple the Turkish government was orchestrated by an exiled cleric who lives in the United States.

Obama, speaking at the G20 summit in China, praised the Turkish people who resisted the coup attempt, saying they "affirmed their commitment to democracy” and that they are “the strength and brilliance of democratic institutions."

Obama also said he was glad that Erdogan was safe and able to participate in the economic summit, in what appeared to be a better exchange than the one Erdogan had recently had with Vice President Biden regarding the extradition of controversial cleric Fethullah Gulen, who lives in Pennsylvania.

In a vague reference to Gulen, Obama said the Justice Department and U.S. national security teams "will cooperate with Turkish authorities to determine how we can make sure that those who carried out these activities are brought to justice."

Obama also made clear his “unequivocal condemnation of these actions” and that he spoke personally to Erdogan when the coup attempt occurred in July to offer U.S. support.

Gulen's possible extradition was the subject of much discussion and some visible tension when Biden visited Turkey a few weeks ago.

On Sunday, Erdogan said that "post-coup evidence" indicating Gulen orchestrated the plot from afar is being amassed and will be submitted to U.S. authorities. He also said that officials from both countries are working diligently through the extradition request, according to an English translator.

Obama thanked Erdogan and the Turkish people for their efforts to defeat ISIS and for their humanitarian efforts in response to the years-long civil war in neighboring Syria.

Erdogan, in turn, called on Obama to fight all terror groups. Turkey opposes U.S. support of Kurdish fighters that it considers to be terrorists.

“There is no good terrorist or bad terrorist; every kind of terrorism is bad,” said Erdogan, according to Politico.