Mr. Lawsky will continue to investigate foreign banks suspected of Libor manipulation through their New York branches, according to two of the people briefed on the matter. Mr. Lawsky is also investigating the foreign currency manipulation.

The Libor investigation, which began seven years ago with a single investigator at the Commodity Futures Trading Commission, has spread to criminal and regulatory agencies around the globe. In addition to the Justice Department’s criminal and antitrust divisions, Deutsche Bank settled with Mr. Lawsky’s office, the trading commission and the Financial Conduct Authority of Britain.

As part of the deals, the bank will install an independent monitor, the first such requirement in a Libor case. More broadly, the authorities ordered the bank to dismiss seven managers suspected of involvement in the wrongdoing, all but one of whom are in London. They were among 29 employees suspected of playing a role, most of whom have already left the bank.

The settlement is something of a mixed bag for Deutsche Bank.

In agreeing to the deals, the bank closes a sordid chapter in its history. But the terms announced on Thursday will be costly to shareholders, and could do further damage to the bank’s already battered reputation.

“We deeply regret this matter but are pleased to have resolved it,” Jürgen Fitschen and Anshu Jain, the co-chief executives of Deutsche Bank, said in a statement on Thursday. “The bank accepts the findings of the regulators.”

The size of the fine is particularly hard to swallow for the bank, which had hoped to pay less than $2 billion, one of the people briefed on the matter said. And while the deals will provide some closure to Deutsche Bank, they will not end the bank’s legal problems. It is also ensnared in the foreign exchange investigation. And it is suspected of violating United States sanctions against countries like Iran.