ISTANBUL -- An American pastor who has been in custody for nearly two years on terror and espionage charges will be put under house arrest as his trial continues, Turkey's official news agency said Wednesday. Anadolu news agency said that Pastor Andrew Craig Brunson, a 50-year-old evangelical pastor from Black Mountain, North Carolina would be released from a jail in western Turkey and be remanded at his house.

It was not clear when he would be transferred, but his lawyer Ismail Cem Halavurt confirmed to CBS News that the decision was made to move Brunson to house arrest. Brunson's family was "elated" by the news and they were at the prison waiting for his release, according to Halavurt.

Brunson has been in custody since he was arrested in December 2016.

Get Breaking News Delivered to Your Inbox

If convicted, he faces up to 15 years in prison for "committing crimes on behalf of terror groups without being a member," in reference to outlawed Kurdish militants and the network of a U.S-based Muslim cleric blamed for a failed coup attempt, as well as an additional 20 years for espionage.

Brunson strongly denies the charges.

The case has strained ties between NATO allies Turkey and the United States. President Donald Trump has repeatedly demanded his release.

Mr. Trump tweeted in Brunson's defense last week, calling it "a total disgrace" that Brunson is being held. "He has done nothing wrong, and his family needs him!"

Brunson's case was among issues Trump and Turkish President Recep Tayyip Erdogan discussed by telephone earlier.

At the end of a recent hearing, the court inside a prison complex in the town of Aliaga in western Turkey rejected Brunson's lawyer's request that he be freed pending the outcome of the trial. The case was adjourned until Oct. 12.