NEW YORK — Bank of New York Mellon (BK) on Thursday agreed to pay $714 million to resolve federal and state allegations that it defrauded pension funds and other clients by misrepresenting how it handled their foreign exchange transactions.

The investment services and management company admitted it falsely told customers that it would provide them with the "best rates" available in a process designed to "maximize the proceeds of each trade" in the foreign currency exchange market, according to the U.S. Department of Justice and New York's top legal official.

At the same time, Bank of New York Mellon got more favorable rates for its own foreign exchange trades and profited from the difference between those rates and the higher rates assigned to customers. The transactions in question were executed before early 2012.

"The Bank of New York Mellon's custody clients, many of whom are public pension funds and non-profit organizations, trusted the bank to be honest about the financial services it was providing and to deal with them fairly," said Manhattan U.S. Attorney Preet Bharara. "BNYM and its executives, motivated by outsized profits and bonuses, breached this trust and repeatedly misled clients."

The settlement "shows that institutions and individuals responsible for defrauding investors will be held accountable and face serious consequences for their wrongdoing," said New York Attorney General Eric Schneiderman.

The settlement covers allegations raised by both investigative agencies, as well as related actions by the Securities and Exchange Commission and the U.S. Department of Labor, plus class-action lawsuits filed by private customers. Bank of New York Mellon said the agreement resolved substantially all of the foreign exchange-related actions pending against the company.

"We are pleased to put these legacy FX matters behind us, which is in the best interest of our company and our constituents," Bank of New York Mellon said in a statement. "We continue to improve our product offerings to ensure they are meeting client demand and positioning clients to succeed in an increasingly complex financial environment."

The company has $28.5 trillion in assets under custody and/or administration, along with $1.7 trillion in assets under management. Bank of New York Mellon shares closed down 1.3% at $40.30 in Thursday trading.