Deutsche Bank has agreed to pay a fine of $220m (£166m) to 45 US states to settle allegations that it manipulated inter-bank lending rates.

An investigation led by the attorney generals of New York and California revealed that Germany's largest lender had made false London interbank offered rate (Libor) submissions between 2005 and 2010 and its traders had attempted to influence other banks' Libor submissions to benefit their trading positions.

Libor is a global benchmark interest rate set by a group of leading banks. It is the rate at which they borrow money from each other for the short-term.

New York Attorney General Eric Schneiderman said government entities and not-for-profit organisations across the US were defrauded of millions of dollars when they entered into swaps and other financial contracts with Deutsche Bank without knowing that the Libor rate was being manipulated.

Deutsche Bank is the second bank to reach a settlement with US states over the issue after Barclays agreed to pay $100m last year.

"We will not tolerate fraudulent, manipulative or collusive conduct that interferes with or undermines confidence in our financial markets," Schneiderman said. "Large financial institutions, like all other market participants, have to abide by the rules.

"As a result of Deutsche Bank's misconduct, government entities and not-for-profits were defrauded of funds that otherwise could have been used to benefit New Yorkers."

US entities with Libor-linked swaps and other investment contracts with Deutsche Bank will be notified if they are eligible to receive compensation from the settlement fund.

The fund will also be used to pay for the costs of the states' investigation.

A separate probe by US and British regulators into Deutsche Bank's alleged manipulation of the Libor rate led to a $2.5bn fine being slapped on the bank in 2015.

The UK's Financial Conduct Authority said at least 29 employees of the German lender – based in London, Frankfurt, Tokyo and New York – were involved in the scam.