The U.S. lifted sanctions Friday against Turkey's justice and interior ministers over the detention of an American pastor Andrew Brunson.

Brunson spent nearly two years in confinement in Turkey on espionage and terrorism-related charges. He was sentenced to three years in prison in October but then was released and allowed to leave the country for the time already spent in custody.

The U.S. froze the assets of Turkey's Interior Minister Suleyman Soylu and Justice Minister Abdulhamit Gul in August.

The Treasury Department announced the lifting of the sanctions in Washington.

FREED PASTOR ANDREW BRUNSON TALKS ABOUT NIGHTMARISH TURKEY DETENTION, PRAYING WITH TRUMP

In a diplomatic tit-for-tat, the Turkish government responded by slapping sanctions on Attorney General Jeff Sessions and Homeland Security Secretary Kirstjen Nielsen. Those sanctions are also being lifted today, according to Turkish officials.

Andrew Brunson, an evangelical pastor from Black Mountain, North Carolina, was released from Turkey in October.  (AP Photo/Emre Tazegul)

The moves are the latest in what appears to be an easing of tensions between key NATO allies and come just a day after President Trump spoke with Turkish President Recep Tayyip Erdgogan.

In a call between the two leaders, “President Erdogan expressed his condolences for the tragic loss of life at the Synagogue in Pittsburgh,” and “both leaders discussed a desire to work together particularly on their coordination in Syria,” according to a statement released by the White House.

Turkish and U.S. troops also began joint patrols in northern Syria Thursday.

“Some of the sanctions that were put in place were directly connected to pastor Brunson and there’s a logic to now removing those,” Secretary of State Mike Pompeo said days after Brunson’s release.

Brunson’s release followed a tense diplomatic standoff between the U.S. and Turkey.

ANDREW BRUNSON, AMERICAN PASTOR DETAINEDIN TURKEY, IS FREED, SENTENCED TO TIME SERVED

Brunson was detained in October 2016 detention on trumped up terror and treason charges.

Turkey targeted the 50-year-old pastor as part of a massive government crackdown following a failed coup months earlier.

Brunson returned to the U.S. aboard a military jet and then went to the White House to meet President Trump.

When Brunson asked Trump if he could pray for him, the president replied, “Well, I need it probably more than anyone else in this room, so that would be very nice, thank you.”

As Trump bowed his head, a kneeling Brunson asked God to give the president “supernatural wisdom to accomplish all the plans you have for this country and for him. I ask that you give him wisdom in how to lead this country into righteousness.”

Fox News' Nicholas Kalman and the Associated Press contributed to this report.