An American pastor held on espionage charges in Turkey, the focus of an intensive campaign by top United States officials seeking his freedom, was moved from jail to house arrest on Wednesday because of health concerns.

Andrew Brunson, a 50-year-old evangelical pastor from North Carolina, has been held for more than a year and a half in a case that has aggravated already tense relations between Turkey and the United States, longtime allies. He is one of 20 Americans who were charged after a failed coup against President Recep Tayyip Erdogan in 2016.

President Trump spoke to Mr. Erdogan by phone about the case, and posted a message on Twitter last week urging the Turkish leader to “do something” to free the pastor.

On Wednesday, Secretary of State Mike Pompeo also took to Twitter to say that while the United States welcomed the “long overdue news that Pastor Brunson has been moved from prison to house arrest,” the measure was “not enough.”