The Trump administration levied sanctions against two top Turkish government officials Wednesday, fulfilling its pledge to punish Turkey for not releasing a detained American pastor and sending relations between the NATO allies to a new low.

In announcing the sanctions against Turkish Justice Minister Abdulhamit Gul and Interior Minister Suleyman Soylu, the Treasury Department said the two had “played leading roles in the organizations responsible for the arrest and detention of Pastor Andrew Brunson.”

Those organizations, it said, were responsible for “serious human rights abuses,” including Brunson’s arrest in 2016 and continued detention on terrorism charges.

The measures came less than a week after President Trump promised to “impose large sanctions” on Turkey if Brunson was not immediately freed and allowed to come home, and Vice President Pence warned the Turkish government to “be prepared to face the consequences.”

Turkey’s Foreign Ministry registered a “strong protest” against actions it called inexplicable, disrespectful and illegal. The sanctions, it said in a statement, will “seriously damage” efforts to put already tenuous U.S.-Turkey relations back on track, and the Foreign Ministry called for them to be rescinded.

“The aggressive attitude of the U.S. serves no purpose,” it said in a statement, adding that Turkey would reciprocate “without delay.”

Foreign Minister Mevlut Cavusoglu tweeted that “U.S. attempts to impose sanctions on our two ministers will not go unanswered,” although no immediate reciprocation was announced.

Turkish President Recep Tayyip Erdogan has long cited a separation of powers to say that he has no control over his country’s judiciary, although in the past he has expressed an interest in trading “pastors” with the United States. The reference was to Turkey’s request for extradition of Muslim cleric Fethullah Gulen, a onetime Erdogan ally who has lived in the United States as a permanent resident for decades, and whom Turkey charged with orchestrating a failed coup attempt in July 2016.

Brunson, who has lived in Turkey for nearly two decades, was arrested later that year and charged with complicity in the attempt to overthrow Erdogan’s government. Tens of thousands of Turks were arrested on similar charges.

U.S. officials have repeatedly said that Brunson is innocent and demanded his release.

Trump, who met with Erdogan last month at a NATO summit in Brussels, believed he had made a deal with the Turkish leader that included releasing Brunson in exchange for a Turkish woman being held in Israel on terrorism charges. Although the woman was released and deported to Istanbul, the Turkish court hearing Brunson’s case agreed last week only to allow him to leave prison for house arrest while his trial continued.

White House officials accused Erdogan of reneging on the secret agreement and attempting to use Brunson as a “bargaining chip” to win concessions. Trump’s sanctions threat came the next day.

In a briefing for reporters after the sanctions were announced, White House spokeswoman Sarah Huckabee Sanders said that Trump was “not happy with Turkey’s decision not to release Pastor Brunson” and had directed the Treasury Department to impose the measures.

“We’ve seen no evidence that Pastor Brunson has done anything wrong, and we believe he is a victim of unfair and unjust detention by the government of Turkey,” Sanders said. Gul and Soylu, she said, “played leading roles in the arrest and detention” of Brunson. “As a result, any property or interest in property of both ministers within U.S. jurisdiction is blocked, and U.S. persons are generally prohibited from engaging in transactions with them.”

The indictment against Brunson accuses him of participating in the coup, as well as attempting to convert Turkish Kurds to Christianity. Outrage over his detention has been bi­partisan, although the case has taken on particular importance for evangelical Christians in the United States, who form an important part of Trump’s political base.

Family Research Council President Tony Perkins, who serves on the U.S. Commission on International Religious Freedom, said in a statement: “The president is not acting alone. A bipartisan majority in both the House and Senate are supportive of the president acting on behalf of an innocent American being held by tyrants in Turkey. Now is the time for Turkey to begin acting like the NATO ally that it claims to be and live up to its own constitution.

In a statement issued as he was en route to meetings in East Asia, Secretary of State Mike Pompeo said that the “Turkish government refused to release Pastor Brunson after numerous conversations between President Trump and President Erdogan, and my conversations with Foreign Minister Cavusoglu. President Trump concluded that these sanctions are the appropriate action.”

State Department spokeswoman Heather Nauert told reporters that the administration will continue its talks with Turkish officials even as the sanctions take effect. Pompeo and Cavusoglu spoke by phone about Brunson’s detention earlier Wednesday and are expected to meet on the margins of the meeting of the foreign ministers of the Association of Southeast Asian Nations this week in Singapore, she said.

“We are still pursuing a diplomatic approach,” Nauert said.

According to the Treasury Department, Wednesday’s sanctions were imposed in accordance with an executive order Trump signed in December pursuant to the Global Magnitsky Act, a human rights measure Congress passed in 2016.

The global order, included in the fiscal 2017 Defense Department funding authorization, expanded authority under the 2012 Magnitsky Act, named after a Russian lawyer and auditor who uncovered tax fraud and graft linked to the Kremlin, leading to his arrest and death in prison under mysterious circumstances.

Trump’s executive order was used this summer to sanction people in Nicaragua deemed responsible for human rights abuses and corruption.

The upheaval over the Brunson case comes as U.S.-Turkey relations had begun to improve slowly after years of tension, mostly having to do with conflicting objectives in Syria. Trump has repeatedly lauded Erdogan as a strong leader and, after their meeting last month in Brussels, praised the Turkish president while criticizing other NATO leaders.

Erin Cunningham in Jerusalem contributed to this report.