President Trump speaks with Turkish President Recep Tayyip Erdogan, right at the beginning of the plenary session of the Group of 20 Summit in Hamburg on Friday. (Felipe Trueba/European Pressphoto Agency)

Eric S. Edelman is a former U.S. ambassador to Turkey and a senior adviser at the Foundation for Defense of Democracies. Merve Tahiroglu is a research associate at the Foundation for Defense of Democracies.

Rumors are swirling in Washington about a potential prisoner swap with Turkey. The Turks want the United States to release a Turkish-Iranian millionaire awaiting trial in Manhattan, in return for which they might free a North Carolina pastor being held in a prison in Izmir. Both men are accused of threatening national security. Yet a trade would be a grave mistake, one that would help Turkish President Recep Tayyip Erdogan to export his contempt for the rule of law to the United States.

Reza Zarrab, the Turkish-Iranian businessman, was arrested upon his arrival in Miami in March 2016 for conspiring to evade international sanctions against Iran. Zarrab, who owns businesses in Turkey, Dubai and China, is believed to have laundered money and gold from Iran at the height of the U.S.-led sanctions regime in 2012-2013. In December 2013, Zarrab was arrested in Turkey as part of a historic corruption scandal that implicated several ministers and businessmen with close ties to Erdogan’s government. Under legally dubious circumstances, Zarrab was eventually released. But the federal indictment filed by then-federal prosecutor Preet Bharara, in many ways echoing the findings of the 2013 Turkish prosecutor’s investigation, put Ankara’s role in Tehran’s underground economy back in the spotlight.

Pastor Andrew Brunson’s case is of a totally different nature. He is accused of membership in “an armed terrorist organization” — the so-called “Fethullah Gulen Terrorist Organization” that Ankara blames for Turkey’s failed coup last July. (Fethullah Gulen, a former Erdogan ally turned mortal foe, is a Muslim cleric who has lived for many years in the United States.) Before his arrest, Brunson lived with his family in Turkey for 23 years without incident. He is now among the more than 50,000 people in Turkey arrested on similar charges in the past 11 months. Brunson’s lawyer has decried the utter lack of evidence in the pastor’s case.

President Trump appears to be keen to achieve Brunson’s release. He reportedly brought up the issue three times in his first meeting with Erdogan in May, and Secretary of State Rex Tillerson met with Brunson’s wife while visiting Turkey in March. Turkish officials, however, prefer to highlight Zarrab’s case with their American counterparts.

And the stakes have only gotten higher. In March, U.S. authorities arrested another Turk connected to the case, the banker Mehmet Hakan Atilla. Zarrab and Atilla could reveal at trial new information implicating Erdogan or his family in the sanctions-avoiding scheme.

Trump may find a diplomatic deal with Ankara for Brunson appealing. After all, one of his few diplomatic accomplishments since taking office was securing the release, during the visit of Egyptian President Abdel Fattah al-Sisi, of charity worker Aya Hjiazi, an American citizen who had been jailed in Cairo for three years. But trading a peaceful faith leader imprisoned on spurious charges in exchange for a sleazy middleman accused of corrupting a foreign government on behalf of Iran would only help Erdogan suborn the rule of law in the United States as he has done in Turkey.

Since he first came to power in 2002, Erdogan has systematically undermined his country’s fragile legal institutions by staging show trials featuring his “enemies.” Zarrab owes his freedom in Turkey to a blatant political intervention in the judicial system. Within weeks of the 2013 anti-corruption operation, the government replaced all law enforcement officials involved in the investigation. Within months, all the cases were dismissed and all the suspects freed.

Since the coup attempt, Erdogan has effectively ruled by decree. Government critics risk arbitrary detention on dubious terrorism charges. More than a dozen opposition parliamentarians are in jail. As Ankara prepares to transition from a parliamentary to a presidential system, the lines between Turkey’s executive, legislative and judicial branches are becoming even more blurred.

The Turkish president also appears intent on extending his authoritarianism to American shores. While Erdogan watched, his bodyguards viciously beat protesters outside the Turkish ambassador’s residence in Washington in May. When the State Department expressed concern, the Turkish Foreign Ministry had the effrontery to summon U.S. Ambassador John Bass to protest the actions of the D.C. Metropolitan Police. And this was not the first assault of its kind in Washington. During Erdogan’s 2016 visit, his bodyguards roughed up protesters in front of the Brookings Institution when Erdogan arrived to speak. These attacks occurred while Erdogan’s lobbyists in Washington have been working full-time to achieve a “diplomatic” deal to spring Zarrab as the price for improving U.S.-Turkish bilateral relations.

Trump should intensify the diplomatic effort to secure the release of Brunson — but not by negotiating a prisoner swap for Tehran’s bag man in Turkey. Erdogan’s efforts to undermine the U.S. legal system shouldn’t be rewarded. For Turks who are trying to protect what’s left of their country’s democracy, it’s the least that Washington can do.