Three European banks that are part of Italy's UniCredit group have agreed to pay $1.3 billion to resolve charges by federal and state finance regulators and prosecutors to end an investigation that found they had routed hundreds of millions of dollars involving sanctioned entities in Iran and elsewhere.

Authorities announced Monday that UniCredit SpA, its German subsidiary UniCredit Bank AG and UniCredit Bank Austria have agreed to pay $405 million to the New York State Department of Financial Services, $316 million to the Manhattan District Attorney, $158 million to the Federal Reserve and hundreds of millions more to federal prosecutors and regulators. The banks also agreed to improve their monitoring and compliance efforts.

The sanctions resolve allegations dating back to the early 2000s that they helped entities in Iran and other sanctioned countries, like Cuba and Libya, conduct commerce in U.S. dollars even though they were supposed to be denied access to the U.S. financial system. Senior managers at the banks actively schemed to flout the sanctions, authorities found, with one team leader warning of “unpleasant consequences” if his colleagues slipped up.

“The integrity of our financial system requires financial institutions to comply with our laws, and UCB AG willfully failed to do so,” assistant attorney general Brian Benczkowski of the Justice Department's Criminal Division said in a statement. “Today's guilty plea and $1.3 billion penalty are just punishments for undermining U.S. sanctions and putting our financial system at risk.”

UniCredit SpA, the parent company, was represented by Shearman & Sterling. UCB AG, as the German unit is called, was represented by Clifford Chance. The Austrian unit is represented by Skadden, Arps, Slate, Meagher & Flom.

The Manhattan District Attorney's office said its investigation of UniCredit's compliance with U.S. sanctions began with its investigation of Islamic Republic of Iran Shipping Lines, an entity sanctioned for its alleged role in the country's nuclear program that the DA's office indicted in 2011.

“We never stopped following the money,” district attorney Cyrus Vance said in a statement.

UniCredit said in a statement that it cooperated with the investigations and said its subsidiary banks “remain committed to continued cooperation with regulators globally.”