Turkey's President Erdogan hints at exchange deal for imprisoned Pastor Andrew Brunson

The fate of Andrew Brunson, a US missionary pastor detained by Turkey on charges of trying to overthrow the government, depends on whether the US will hand over the man Turkey's president holds responsible for a failed coup.

Thousands of people have been detained in a crackdown since the failed coup, including Brunson, who ran a small church in Izmir on Turkey's western coast.

Pastor Andrew Brunson with his wife Norine.(Facebook/Andrew & Norine Brunson)

Brunson has been held since October. Turkish media say the charges against him include membership of a network allegedly run by Fethullah Gulen, a US-based Muslim cleric blamed for the coup.

The United States says Brunson has been wrongfully imprisoned and has called for him to be released.

In a speech to police officers at the presidential palace in Ankara, Erdogan appeared to link the fate of the two men.

'"Give us the pastor back," they say. You have one pastor as well. Give him [Gulen] to us,' Erdogan said. "Then we will try him [Brunson] and give him to you."

"The [pastor] we have is on trial. Yours is not – he is living in Pennsylvania. You can give him easily. You can give him right away.'

Fethullah Gulen, whose arrest President Erdogan has demanded.Reuters

Brunson denies all charges.

'I don't support any Islamic movement. I have never seen any member of FETÖ [a derogatory term invented by government to refer Gülen movement] in my life,' he said.

Until their arrest, Andrew and Norine Brunson led the Izmir Resurrection Church in Ankara, capital of Turkey, which has up to 40 regular members. They have lived in Turkey for 23 years.

His wife was released shortly after but Andrew has remained in custody with prosecutors alleging he had links with Gülen.

Additional material from Reuters.