ALIAGA, Turkey (Reuters) - A U.S. pastor denied allegations of links to a group accused of orchestrating a failed military coup in Turkey as he went on trial on Monday in a case that has compounded strains in U.S.-Turkish relations.

Slideshow ( 6 images )

Andrew Brunson, a Christian pastor from North Carolina who has lived in Turkey for more than two decades, was indicted on charges of helping the group that Ankara holds responsible for the failed 2016 coup against President Tayyip Erdogan. He faces up to 35 years in prison.

“I’ve never done something against Turkey. I love Turkey. I’ve been praying for Turkey for 25 years. I want truth to come out,” Brunson told the court in the western Turkish town of Aliaga, north of the Aegean city of Izmir.

Brunson has been the pastor of Izmir Resurrection Church, serving a small Protestant congregation in Turkey’s third largest city.

“I do not accept the charges mentioned in the indictment. I was never involved in any illegal activities,” said Brunson, wearing a white shirt and black suit and making his defense in Turkish. His wife was in the courtroom, as were North Carolina Senator Thom Tillis and the U.S. envoy for religious freedom, Sam Brownback.

At the end of the hearing, the court ruled Brunson should remain in jail as the trial continues, the pastor’s lawyer told reporters. He said the next hearing will be on May 7.

Brunson’s trial is one of several legal cases roiling U.S.-Turkish relations. The two countries are also at odds over U.S. support for a Kurdish militia in northern Syria that Turkey considers a terrorist organization.

Washington has called for Brunson’s release while Erdogan suggested last year his fate could be linked to that of U.S.-based Muslim cleric Fethullah Gulen, whose extradition Ankara has repeatedly sought to face charges over the coup attempt.

Gulen denies any association with the coup bid. Tens of thousands of Turks have been arrested or lost their jobs over alleged connections with the coup bid.

“The United States cares deeply about our relationship with Turkey,” Brownback told reporters during a recess at the trial “That relationship is going to have difficulty moving forward as long as Andrew Brunson is incarcerated.”

RELIGIOUS BELIEFS

Brunson’s lawyer said the pastor, detained 18 months ago, was in custody because of his religious beliefs. Turkey is a majority Muslim country though constitutionally secular.

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

The Izmir prosecutor’s office said that sufficient evidence had been obtained to charge Brunson with aiding armed terrorist organizations and obtaining confidential government information for political and military espionage.

A copy of Brunson’s indictment seen by Reuters accuses him of working both with Gulen’s network and the Kurdistan Workers Party (PKK) militant group which has waged an insurgency in mainly Kurdish southeast Turkey and is designated a terrorist group by the United States and European Union.

Halavurt said on Sunday 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.”