A Turkish gold trader whose arrest for an alleged billion-dollar Iran-sanctions-busting conspiracy roiled U.S.-Turkey relations has agreed to testify about the “inside story” of a scheme that shook his nation’s government and hurt U.S. security, Manhattan federal prosecutors revealed Tuesday.

The status of Reza Zarrab, whose 2016 arrest at Disney World prompted efforts by Turkish President Recep Erdogan to free him and the hiring of ex-mayor Rudy Giuliani to try to broker a diplomatic deal, had been a mystery after he stopped coming to court hearings weeks ago.

But the government confirmed Zarrab cut a plea deal as opening arguments were set to begin Tuesday at the trial of Turkish banker Mehmet Hakan Atilla, an alleged co-conspirator. Zarrab is expected to testify Wednesday, and prosecutors were quick to adopt him as their star witness.

“He has accepted responsibility,” prosecutor David Denton said. “He has decided to cooperate. He can tell you the inside story and expose the truth behind the elaborate lies.”

The government contends Zarrab and Atilla were key players in a massive plot to bribe Turkish officials and ministers and use sham transactions in gold and food to launder more than $1 billion in Iranian oil revenue through U.S. banks, posing a threat to national security by helping rescue Iran’s economy from U.S. sanctions.

The alleged scheme was first uncovered by police in Turkey, but Erdogan’s government freed Zarrab and other prisoners in 2013 and purged prosecutors, claiming the charges were part of an anti-government plot fomented by Fethullah Gulen, a dissident cleric living in Pennsylvania.

Erdogan has pressed both the Obama and Trump administrations to hand over Gulen and drop the charges against Zarrab, who could detail official corruption in Turkey. Erdogan also has launched probes of Acting Manhattan U.S. Attorney Joon Kim and his predecessor, Preet Bharara.

Sign up to get the latest updates Get Newsday's Breaking News alerts in your inbox. By clicking Sign up, you agree to our privacy policy.

Zarrab, 34, whose wealth, connections and marriage to a pop-music star made him a celebrity in Turkey, pleaded guilty in October to the sanctions-busting conspiracy and one count of bribing a federal jail guard to smuggle in liquor and a cellphone, according to filings unsealed Tuesday.

Although Denton called Zarrab the “frontman” and Atilla the “architect” of the plot, Atilla’s lawyer said the U.S. case was “upside down” — describing his client as a second-tier official at Turkey’s government owned Halkbank who got no bribes and was “misled and duped” by Zarrab.

Defense lawyer Vic Rocco said Zarrab was the “mastermind” with Iranian leaders of a scheme that had made him “fabulously wealthy,” that he used bribes as “a way of life” and that his payoffs to guards in the United States bought him drugs and women as well as a phone and alcohol.

“He’s a liar, a cheat, a corrupter of men,” said Rocco, telling jurors that Zarrab hoped testifying against Atilla would return him to “his lavish life with the rich and famous” and that his appearance would “open a sewer in this courtroom.”

Turkish efforts to have Gulen extradited have been one subject of special counsel Robert Mueller’s probe of the Trump administration and its former national security adviser, Michael Flynn, who was paid to lobby by Turkish interests, according to news reports.

Despite press speculation that Turkish efforts to help Zarrab might figure in that probe and that he might have agreed to cooperate, however, there was no indication in the opening statements Tuesday that his testimony will touch on matters outside the sanctions conspiracy.