Regions Financial Corp. has agreed to pay $51 million in a settlement with federal and Alabama regulators over alleged faulty accounting of $168 million in loans that inflated the bank’s income in financial reports.

Regions, based in Birmingham, Alabama, signed the settlement announced Wednesday with the Securities and Exchange Commission, the Federal Reserve and Alabama’s Department of Banking. The SEC also agreed not to pursue legal action against Regions, saying the bank had cooperated with the agency’s investigation and taken significant steps to correct problems. The SEC has settled related civil fraud charges with two former senior managers of Regions Bank and is pursuing its case against a third.

The so-called “deferred prosecution agreement” with Regions applies to its failure to maintain adequate controls over its accounting when the violations occurred in 2009, the SEC said. The bank won’t be prosecuted if it refrains from securities law violations and meets other conditions for a two-year period ending in July 2016.

Regions noted in a statement that it has reduced its losses on loans and improved its finances since the 2008 financial crisis, and named a new CEO and chairman, as well as a new chief financial officer, chief risk officer and other senior executives. The bank also said it has established an ethics council and taken other steps to improve corporate governance.

Under the settlement with the three regulators, a $26 million civil penalty levied on the bank by the SEC will be offset provided it pays a $46 million penalty to the Federal Reserve. Regions also will pay a $5 million penalty to the Alabama agency.

Regions Financial, the parent company, is one of the largest U.S. regional banks with about $118 billion in assets and operations in 16 states in the South, Midwest and Texas.

Jeffrey Kuehr, who was Regions Bank’s head of special assets, and former chief credit officer Michael Willoughby, each are paying a $70,000 civil penalty and will be barred for five years from serving as officers or directors of any public company. Kuehr and Willoughby neither admitted nor denied wrongdoing but agreed to refrain from future violations of the securities laws.

The SEC is continuing its case against Thomas Neely, the former head of the bank’s risk analytics group, who the agency said was the main architect of the loan accounting scheme.

Neely’s attorney, Augusta Dowd, said her client will dispute the SEC charges. “The charges are unwarranted, and we intend to work vigorously and aggressively to clear his name,” Dowd said in a statement. “We do not believe the charges … will withstand scrutiny.”