Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Vice President Joe Biden on Thursday resisted demands by Turkey's president to immediately detain and turn over a Pennsylvania imam suspected of plotting last month's failed military coup attempt, giving a blunt lesson on American rule of law.

In a joint appearance with Turkish President Tayyip Erdogan in the capital of Ankara, Biden outlined the steps required to extradite someone to another country: Gather evidence, go to court with probable cause, get permission from a judge.

"We have no reason to shelter someone who would attack an ally and try to overthrow a democracy," Biden said. "Can you imagine us being happy with another military state? We didn’t get on so well with your previous military states. So what motive could we possibly have? None. Except we're bound by the law."

Related: Turkey Formally Requests U.S. Return Cleric Fethullah Gulen — but Not Over Coup

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Since the July 15 coup attempt, Erdogan has been pressing the United States to extradite the cleric, Fethullah Gulen, who has been living in self-imposed exile since 1999 and had become an Erdogan antagonist. The Turkish president has accused Gulen of undermining his government, and has cracked down on Gulen's Turkish businesses and associates.

In their formal request for extradition, however, Turkey "would not characterize as saying it relates to the 2016 coup," a State Department spokesman said this week.

U.S.-based cleric Fethullah Gulen, whose followers Turkey blames for a failed coup, speaks to journalists at his home in Saylorsburg, Pennsylvania, on July 16, 2016. Greg Savoy / REUTERS TV / Reuters, file

Gulan, who lives in Pennsylvania's Pocono mountains, has denied he was involved in the coup attempt, in which nearly 200 people died.

Related: U.S.-Based Cleric Fethullah Gulen Blamed by Erdogan in Turkey Coup Bid

Biden's visit to Ankara was meant as a display of support for Erdogen, who is also fighting ISIS in neighboring Syria and helping his nation heal from a June terror attack.

The two leaders appeared together Thursdasy at Turkey's presidential palace, where Erdogan accused Gulen of operating a terrorist operation from Pennsylvania and said the government was collecting evidence of the cleric's role in the uprising. Erdogan cited the countries' extradition treaty as a basis for arresting Gulen, holding him in pretrial detention and ultimately sent back to Turkey to face trial.

"I'm confident that the United States will take the necessary measures to cater to our expectations in that regard," he said.

But, after a reporter's question, Biden pushed back.

"It's a simple proposition in America. We are a nation of laws. We are bound by a Constitution," Biden said. "And we are sworn to uphold that Constitution."

But Biden also said the Obama administration had personnel in Turkey helping collect evidence in a possible extradition case.

"We are determined to listen to every scrap of evidence that Turkey can provide or that we can find out about," he said.