Pastor Andrew Brunson trial begins with US religious freedom envoy Sam Brownback in court

US pastor Andrew Brunson goes on trial in Turkey today facing up to 35 years in jail after being accused of aiding a terrorist group held responsible for the failed 2016 coup against President Tayyip Erdogan.

Brunson's lawyer said the charges are 'totally unfounded' and the preacher was really being held because of his Christian faith.

Andrew Brunson has been detained for the last 18 months after being arrested following the failed coup against President Erdogan in July 2016.Reuters

Ismail Cem Halavurt said Brunson, originally from North Carolina who has lived in Turkey for 21 years and been detained for 18 months, should be freed at Monday's hearing in the Mediterranean city of Izmir.

'There is evidence that shows Brunson was arrested due to his faith,' Halavurt told Reuters on the eve of the trial, saying Brunson's religious role had been 'classified as aiding terror organizations'.

America's religious freedom envoy Sam Brownback is in Turkey and will attend the trial alongside North Carolina senator Thom Tillus. It is one of several legal cases that have strained relations between Turkey and the United States, who are also at odds over US support for a Kurdish militia in northern Syria which Turkey considers a terrorist organisation.

Washington has called for Brunson's release and President Donald Trump has personally appealed to Erdogan on Brunson's behalf. However the requests have been ignored and Erdogan suggested last year his fate could be linked to that of US-based Muslim cleric Fethullah Gulen, whose extradition Ankara has repeatedly sought to face charges over the coup attempt in July 2016.

'The (pastor) we have is on trial. Yours is not – he is living in Pennsylvania... You can give him right away,' Erdogan said in September. Gulen has denied any link to the coup attempt in which more than 240 people were killed.

The high-security prison where Pastor Andrew Brunson is being held in Izmir, Turkey.Reuters

A copy of Brunson's indictment seen by Reuters accuses him of working both with Gulen's network and the Kurdistan Workers Party (PKK) which has fought an insurgency in southeast Turkey and is designated a terrorist group by the United States and European Union. Prosecutors are demanding a 20-year prison term for espionage and another 15 years for committing crimes on behalf of terror organisations.

Halavurt said he believed Brunson would ultimately be acquitted and there was no reason for his continued detention during trial. 'Our prior expectation from the hearing is ending the arrest,' he said. 'We want Brunson to be freed immediately.'

Additional reporting by Reuters