Federal prosecutors in New York announced charges Tuesday against a Turkish state bank accused of a multibillion-dollar scheme to violate United States sanctions on Iran.

The prosecutors said Halkbank and its "officers, agents, and co-conspirators directly and indirectly used money service businesses and front companies" in Iran, Turkey, the United Arab Emirates and other countries to violate prohibitions on Iran's access to the American financial system and the use of revenue from Iranian oil and gas sales, among other offenses.

The U.S. attorney for the Southern District of New York, Geoffrey Berman, said, "The bank's audacious conduct was supported and protected by high-ranking Turkish government officials, some of whom received millions of dollars in bribes to promote and protect the scheme."

Approximately $20 billion worth of Iranian funds, which should have been restricted by sanctions, were illegally transferred, according to prosecutors. The bank would facilitate transactions designed to appear to be purchases of food and medicine for "humanitarian" reasons when they were instead illicit transactions designed to get around sanctions placed on Iran.

The money, court documents allege, came from sales from Iran's national oil company to Turkey. Sanctions and U.S. anti-money laundering programs were meant to block proceeds of those sales from being returned to Iran. Instead, prosecutors said, Halkbank found ways to get those oil proceeds to Iran.

Turkey has claimed the state-owned bank did not breach U.S. sanctions.

The charges are linked to a previous case involving a Turkish banker who is close to Turkish President Recep Erdogan. The banker, Reza Zarrab, was arrested in Florida in March 2016 for evading U.S. sanctions.

Businessman Reza Zarrab is surrounded by journalists as he arrives at a police center in Istanbul on Dec. 17, 2013. Ozan Kose / AFP - Getty Images file

Zarrab, 33, and other financial professionals were charged with breaking U.S. sanctions and "laundering the proceeds of those illegal transactions, and defrauding several financial institutions by concealing the true nature of these transactions."

Zarrab, a dual Turkish Iranian national, struck a deal with prosecutors to cooperate and avoid trial, however.

Prior to striking a deal with prosecutors, then-acting U.S. Attorney Joon Kim sent a letter in late March 2017 suggesting that Rudolph Giuliani and former U.S. Attorney General Marc Mukasey had joined Zarrab's defense team to "explore a potential disposition of the criminal charges in the matter."

At the time, Kim raised his concerns that "Mr. Giuliani and Mr. Mukasey's involvement in this case is intended to occur entirely outside of the Court's purview and knowledge."

Giuliani and Mukasey had previously visited Turkey to discuss the case with Erdogan, a U.S. official directly briefed on the matter told NBC News.

Erdogan defended Zarrab when he was implicated in a 2013 Turkish corruption scandal that also implicated Erdogan associates. The Turkish leader called Zarrab — who had given his wife's charity $4.5 million — a philanthropist and praised his contributions to Turkish society. All charges against Zarrab and Erdogan's associates were dropped.

In 2017, Zarrab took the stand in a U.S. federal trial in New York to testify against a Halkbank executive who was arrested for his role in the scheme.

Hakan Atilla was ultimately convicted and sentenced to 32 months in prison for conspiring to violate U.S. sanctions.

Zarrab testified in court that he paid $60 million in bribes to the former economic minister of Turkey, and court records show that he was in close contact with the head of Halkbank, Atilla's boss.

In the most dramatic moment of the trial, Zarrab implicated Erdogan in the sanctions-evasion operation.

Erdogan, who asked both the Obama and the Trump administrations to drop the case, denies wrongdoing and said the trial was a conspiracy by the U.S. to weaken Turkey.

Zarrab, who is married to a famous Turkish singer, is fabulously wealthy, according to court documents, which detailed how he was building a yacht longer than a football field with three personal submersibles.