The Federal Reserve announced on Thursday it has reached an agreement with five U.S. banks on penalties totaling $766.5 million over problems in their mortgage servicing businesses as part of a larger $25 billion foreclosure deal struck between the banks and state and federal agencies.

In April 2011 banking regulators reached a deal with 14 banks on the steps they have to take to clean up how they deal with struggling homeowners but no fines were levied at the time.

On Thursday the central bank said it was announcing penalties related to that deal as part of an effort to coordinate with the larger settlement between banks and state attorneys general and the Justice Department that also was announced on Thursday.

The banks involved are Bank of America Corp, Citigroup, JPMorgan Chase & Co, Wells Fargo & Co and Ally Financial Inc, the Fed said.

The Fed said its penalties are included in the larger deal's $25 billion total.

Under the agreement the banks would not pay their fines to the Fed and would instead make them as part of the programs that comprise the broader state-federal deal.

Under the Fed agreement the breakdown of what each bank has agreed to pay is $175.5 million for Bank of America, $22 million for Citigroup, $275 million for JPMorgan Chase, $87 million for Wells Fargo and $207 million for Ally.

A Fed spokeswoman said JPMorgan's penalty is the largest ever levied by the agency.

The penalties being imposed are based on the amount allowed under law, the severity of the problems found and on the size of a bank's foreclosure operations, according to the Fed.

If after two years the banks do not pay the full amount of the penalty through the state deal or similar programs they would have to pay the difference to the Fed.

The penalties are the result of mortgage servicing problems that burst into public view in 2010 when government agencies began investigating bank foreclosure practices, including the use of robo-signers to sign hundreds of unread foreclosure documents a day.

Mortgage servicers collect payments and handle foreclosures.

In April of 2011, 14 mortgage servicers entered into a settlement with the Office of the Comptroller of the Currency, the Fed and the now defunct Office of Thrift Supervision on steps that have to be taken to correct and improve their servicing practices, such as providing borrowers with a single point of contact for questions.

The OCC on Thursday also announced penalties on Bank of America, Citigroup, JPMorgan Chase and Wells Fargo related to the April agreement.

The Fed and the OCC oversee different parts of banking institutions, with the Fed focused on the overall holding company, and the OCC focused on the banking unit within that umbrella.

Because of this difference, the penalties were announced separately but the agencies said they coordinated their efforts.

The OCC said the banks have agreed to pay $394 million in penalties. The regulator said, however, that the banks could satisfy this requirement by showing that they have made an equal amount of payments through the state-federal deal.

If after three years the regulator determines they have not satisfied this agreement the banks would be required to pay the fine to the OCC.

Under the OCC agreement the breakdown of what each bank could owe is $164 million for Bank of America, $34 million for Citigroup, $113 million for JPMorgan Chase, $83 million for Wells Fargo.

(Reporting By Dave Clarke in Washington D.C.; Editing by Gerald E. McCormick and Tim Dobbyn)