In late February, as the United States and the rest of the world were adjusting to President Donald Trump, and Turkey was focused on a push by its president, Recep Tayyip Erdogan, to expand his power, Erdogan agreed to an unusual meeting with some American visitors.

The guests included Rudolph Giuliani, a former New York City mayor who had acted as a surrogate for Trump during his campaign, and another prominent lawyer, Michael Mukasey, who served as attorney general in US president George W Bush’s administration.

The purpose of the visit by Giuliani and Mukasey was rather extraordinary: They hoped to reach a diplomatic deal under which Turkey might further aid US interests in the region. In return, the United States might release the two men’s client, Reza Zarrab, a Turkish gold trader being held in a Manhattan jail whose case had attracted Erdogan’s interest.

Mukasey, in court papers made public on Wednesday, characterised the meeting as part of an effort to seek “a state-to-state resolution of this case”, and he hinted at some progress: “Senior officials in both the US government and the Turkish government remain receptive to pursuing the possibility of an agreement.”

Plea bargaining, even for the most well-connected of defendants, is normally conducted by defence lawyers and prosecutors, often in courthouse corridors or drab government offices. But the efforts being made on behalf of Zarrab, which have also involved discussions at high levels of the Trump administration, show the way political access and diplomatic overtures can also be employed.

Zarrab (33) is a well-known figure in Turkey. He is married to a Turkish pop star and is regarded as a member of Erdogan’s circle of friends and associates. Photographs show Erdogan’s wife, Emine, attending at least one charity event alongside Zarrab and his wife.

Zarrab had also amassed “a considerable fortune”, according to US prosecutors, who say his holdings included ownership in a private aeroplane and about 20 properties, boats, luxury automobiles and millions of dollars worth of artwork.

Wealth and influence In 2013, Zarrab was detained by Turkish authorities in a wide-ranging corruption investigation of businessmen with close ties to Erdogan, who was then Turkey’s prime minister. But Zarrab used his wealth and influence with the Turkish government to win his release from prison, US prosecutors have said.

They raised the issue of what they called Zarrab’s “corrupt political connections” in 2016 when they argued that he not get bail in New York, where he faces charges that include conspiring to facilitate millions of dollars of transactions on behalf of Iran and other sanctioned entities through the use of false documents and front companies. Zarrab was born in Iran, moved to Turkey as an infant and has citizenship in both countries. He has pleaded not guilty.

“We have to seek justice, for he is our citizen,” Erdogan said of Zarrab in September.

The subject of Zarrab came up again three weeks ago during a visit to Ankara, Turkey, by US secretary of state Rex Tillerson. During that visit, Turkey’s foreign minister, Mevlut Cavusoglu, accused Preet Bharara, the US attorney in Manhattan whose office first charged Zarrab, of being a pawn of anti-Turkish forces.

Bharara, who was fired by Trump last month, had characterised Cavusoglu’s remarks as “political propaganda”. On Thursday, after the New York Times reported on the strategy by Giuliani and Mukasey to turn the case involving Zarrab into a matter of international diplomacy, Bharara said on Twitter: “One just hopes that the rule of law, and its independent enforcement, still matters in the United States and at the Department of Justice.”

The efforts on Zarrab’s behalf come at a time when Erdogan has become even more powerful in Turkey after a hotly disputed referendum that expanded his authoritarian rule and drew a congratulatory phone call from Trump on Monday.

Mutual interest Erdogan and Trump have made overtures to each another that suggest Turkey and the United States could become closer allies. The new court filing, by Zarrab’s lead lawyer, Benjamin Brafman, includes affidavits from Giuliani and Mukasey that make it clear they hoped to get Erdogan to accept the notion that a diplomatic deal could be of mutual interest to Turkey and the United States.

They write in the affidavits that a resolution that would be favourable for Zarrab could be “part of some agreement between the United States and Turkey that will promote the national security interests of the United States”.

Giuliani and Mukasey suggest that it was “hardly surprising” that senior Turkish and US officials were receptive to a possible deal, considering that none of the transactions in which Zarrab is accused of participating “involved weapons or nuclear technology, or any other contraband”, and “that Turkey is situated in a part of the world strategically critical to the United States”.

Some analysts in Turkey suggested that if Zarrab were to be freed or returned to Turkey, Erdogan might be more inclined to fall in line with US interests in the Middle East. Sinan Ulgen, a former Turkish diplomat and the chairman of the Centre for Economics and Foreign Policy Studies, a liberal-leaning Turkish think tank, said the strategy implied that “allowing a free pass to Zarrab and company would create good will in Ankara that Washington could use to advance its own regional agenda”, with clearer support or at least less interference from the Turkish government.

Erdogan, for example, might be less resistant to US plans to retake Raqqa, the de facto capital of the Islamic State terror group, also known as Isis, in collaboration with a Syrian Kurdish faction. Turkey regards that faction, known as the PYD, as the Syrian offshoot of a proscribed militant group that operates on Turkish soil.

A swift end to the case against Zarrab, Ulgen said, might mean “Turkey would be much less resistant to the US’s missions in Syria, and primarily its support to the PYD.” The United States also needs Turkey to continue to allow anti-Islamic State bombing missions to fly out of an air base in the southern part of the country.

Retaliation Analysts supportive of Erdogan’s government contend that Zarrab’s fate is of limited interest to the Turkish state. In the view of these analysts, the charges against him are spurious and were concocted to smear the Turkish president.

“This Zarrab issue is not a state issue in Turkey,” said Hasan Yalcin, strategic research director at Seta, a government-friendly think tank in Ankara. “It’s not an issue that the Turkish state is focusing on; it’s just speculation that the Turkish state is related to Zarrab.”

State news media in Turkey reported last week that Istanbul’s chief prosecutor had opened an investigation into Bharara and 16 other US-linked individuals in what western diplomats regarded as retaliation for the Zarrab case.

The affidavits by Giuliani and Mukasey were filed by Brafman, the defence lawyer, at the request of the judge, Richard Berman of US district court. Berman initially said the affidavits could be filed under seal and ex parte, meaning the government would also not be able to see them. He subsequently directed that they be filed publicly, Brafman said.

“The affidavits speak for themselves,” Brafman said, declining further comment. Giuliani and Mukasey write that both attorney general Jeff Sessions and Bharara had been apprised “in general terms” before the two lawyers’ meetings with Erdogan and other Turkish officials. They say they also discussed their roles with, and were briefed by, a State Department representative in Turkey before seeing Erdogan.

Copies of Zarrab’s retainer agreements with Giuliani’s and Mukasey’s law firms were also filed with the court but were not unsealed.