American pastor Andrew Brunson has been released after being detained for two years in Turkey.

At a hearing this morning, a Turkish court freed him from judicial control, which lifts his house arrest and travel ban.

Despite a guilty verdict sentencing him to 3 years, 1 month, and 15 days in prison, Brunson may return home to the United States as soon as today due to good behavior and time already served.

NBC News broke the news yesterday of the expected deal between Turkey and the United States over Brunson, a North Carolina pastor who had worked in Izmir for decades and was arrested on terrorism and espionage charges in the aftermath of a failed coup in 2016.

US officials and religious freedom advocates considered the charges against Brunson to be erroneous, and multiple witnesses retracted their testimonies against him during today’s hearing.

Trump administration officials were optimistic but cautious that Turkey would follow through on the deal, reported The Washington Post. The deal would likely lift recent US sanctions in exchange for Brunson’s release by being sentenced today to time already served.

Officials expect Brunson to “be handed back his passport and put on a plane to the US,” reported The Wall Street Journal.

World Watch Monitor was with Brunson and his family and lawyers in Turkey at 8 p.m. local time (1 p.m. eastern time in the US). He was expected to leave for the airport at about 9 p.m. local time/2 p.m. Eastern.

Facing up to 35 years in prison if convicted, Brunson flatly denied all charges. He had declared in court, “I am an innocent man on all these charges. I reject them. I know why I am here. I am here to suffer in Jesus’ name.”

After being held in a number of different detention facilities since his arrest in October 2016, Brunson, 50, was assigned to house arrest in July of this year.

Turkey’s major English-language news service, Hurriyet, reported that during Friday’s court hearing, important prosecution witnesses recanted some of their testimony against Brunson, weakening the government’s case against him. The hearing, held in a prison complex in Izmir, a coastal city, lasted nearly six hours. The court’s ruling at 4:28 p.m. ended Brunson’s ordeal.

“My thoughts and prayers are with Pastor Brunson, and we hope to have him safely back home soon!” President Trump tweeted, shortly followed by another update: “PASTOR BRUNSON JUST RELEASED. WILL BE HOME SOON!”

US Christians have been praying and advocating for Brunson throughout his imprisonment. Leaders including Family Research Council president and US Commission on International Religious Freedom commissioner Tony Perkins and New York pastor Bill Devlin joined him in Turkey for the final hearing.

Perkins said he delivered letters of support to the pastor from the president and vice-president. Devlin, who has attended every court appearance, toldThe New York Times the case received significant attention from the Trump White House in part because Brunson and US Secretary of State Mike Pompeo both belong the Evangelical Presbyterian Church.

Open Doors USA stated Brunson had been imprisoned “for his faith and work as a Christian pastor” and celebrated the news of his release.

“Turkey has done the right thing in allowing him to return to his home country,” said David Curry, Open Doors president. “I applaud President Trump for the unrelenting pressure his administration applied to Turkey on this matter, in part through tariffs and sanctions. The president has rightly recognized that economic leverage can help bring positive change for human rights and can convey a powerful message of solidarity with oppressed religious minorities, especially persecuted Christians.”

Debi Forester, communications director of Brunson’s hometown church in North Carolina, said church members were “all just shouting ‘Hallelujah!’ and doing the happy dance” on the news of his release, according to the Associated Press.

Richard White of Christ Community Church has been with the Brunson family in Turkey for the past couple of days, the AP reported. The church plans a celebration some time after his return.

Brunson faced up to a 35-year prison sentence, but maintained his innocence throughout the saga.

The controversial criminal case against the American pastor was dubbed by Reuters “the most divisive issue in a worsening diplomatic row between Ankara and Washington,” triggering US sanctions and tariffs against Turkey and heated exchanges between Trump and Turkish President Recep Tayyip Erdogan.

Over the summer, CT reported on how the Brunson ordeal lead the administration to take action against Turkey, with Trump tweeting, “They are now holding our wonderful Christian Pastor, who I must now ask to represent our Country as a great patriot hostage. We will pay nothing for the release of an innocent man, but we are cutting back on Turkey!”

Earlier this week, Brunson’s lawyer had filed a formal appeal before the Turkish Constitutional Court to overturn two lower court refusals to release his client from house arrest.

The 10-page petition studied by World Watch Monitor called for “urgent” and “corrective” action by Turkey’s highest court to set free the evangelical pastor In the legal brief submitted at the beginning of the month, attorney Ismail Cem Halavurt argued that after residing in Turkey for more than two decades, the 50-year-old American cleric had been arrested and held “unjustly” for the past two years.

“There is no reasonable or acceptable legal reason for his freedom to be limited in such a way,” the appeal stated. “There is no possibility for the defendant to destroy evidence.”

The written indictment and initial three trial hearings in Brunson’s case consist entirely of individual witness testimony, given by a handful of Turkish prosecution witnesses, without documented pieces of solid evidence submitted.

Halavurt’s appeal noted that the indictment does not include a single report from any government security or intelligence agencies to corroborate the prosecution allegations of Brunson’s links with terrorism and espionage. Both secret and open witnesses for the prosecution have accused the pastor of establishing links with the PKK (outlawed Kurdish separatists) and supporting the FETO network (accused of engineering the failed July 2016 coup attempt against the Turkish government).

But the pastor was not charged with actual membership in either of these two illegal groups which Ankara considers terrorist movements.

Referencing the 19th article of the Turkish Constitution and the 5th article of the European Human Rights Agreement (which Turkey has signed), the appeal stated that Brunson’s two-year imprisonment had violated both Turkish criminal law and his constitutional rights of personal freedom and security. It listed some 24 definitive factors revealing these legal violations of Brunson’s rights.

His lawyer now plans to appeal the sentence, according to Middle East Concern. The advocacy group for persecuted believers said Christians in Turkey are praying for Brunson’s recovery and that they “would not be intimidated by this case but would maintain a clear witness.”