An American pastor has been charged in Turkey with engaging in espionage and having links to terror groups, the country’s state-run news agency said.

An indictment accuses Andrew Brunson of working with US-based cleric Fethullah Gulen’s network and the outlawed Kurdistan Workers’ Party (PKK) to stir chaos in Turkey and divide the country, Anadolu Agency reported.

The news agency said the pastor faces 15 years for alleged crimes committed in the name of Mr Gulen’s group and the PKK and another 20 years for allegedly obtaining state secrets for political and military spying purposes.

Brunson is originally from North Carolina but has lived in Turkey for more than 20 years.

He was arrested during the mass detentions and firings soon after a failed July 2016 coup attempt. He denies any wrongdoing.

The United States has demanded his release.

Turkish President Recep Tayyip Erdogan (Burhan Ozbilici/AP)
Turkish President Recep Tayyip Erdogan (Burhan Ozbilici/AP)

Turkish President Recep Tayyip Erdogan has made Brunson’s possible deportation contingent on Washington agreeing to extradite Mr Gulen to Turkey.

“Give him (Gulen) to us, and we will try (Brunson) and return him,” Mr Erdogan said last year.

Mr Gulen, who lives in Pennsylvania, has denied involvement in the coup.

Prosecutors in the western city of Izmir prepared the indictment, which was accepted by a court.

It was not clear when Brunson’s trial would begin.