The White House threatened Thursday to impose sanctions on Turkey if they do not free an American pastor detained for two years on terror and espionage charges.

"The United States will impose large sanctions on Turkey for their long time detainment of Pastor Andrew Brunson, a great Christian, family man and wonderful human being. He is suffering greatly. This innocent man of faith should be released immediately!" President Trump tweeted.

This was after Vice President Pence delivered the same warning during a speech on religious freedom.

“To President Erdogan and the Turkish government, I have a message on behalf of the president of the United States of America,” Pence said Thursday. “Release pastor Andrew Brunson now or be prepared to face the consequences.”

Pence said, “If Turkey does not take immediate action to free this man of faith and send him home to America, the United States will impose significant sanctions on Turkey until Pastor Andrew Brunson is free.”

Pence made the remarks during a speech to the Ministerial to Advance Religious Freedom.

JAILED AMERICAN PASTOR ON TRIAL IN TURKEY TRANSFERRED TO HOUSE ARREST

Brunson, a 50-year-old evangelical pastor from Black Mountain, N.C., was arrested in December 2016 for allegedly “committing crimes on behalf of terror groups,” a reference to outlawed Kurdish militants and the network of U.S.-based Muslim cleric Fethullah Gulen, who is blamed for a failed coup attempt.

Brunson, who has vehemently denied the charges, faces 15 years in prison for the terror charges and an additional 20 years for espionage.

The case was adjourned until Oct. 12.

Turkey announced this week the pastor has been transferred to house arrest as his trial continues.

The case has strained ties between NATO allies Turkey and the United States. Trump has repeatedly demanded Brunson's release.

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 during a recent telephone call.

Fox News’ Nick Kalman and Lucia I. Suarez and The Associated Press contributed to this report.