WASHINGTON – Former Countrywide Financial chief Angelo Mozilo, the most high-profile executive to face federal charges in connection with the financial crisis, agreed Friday to pay $23 million to settle allegations by the Securities and Exchange Commission that he committed fraud and insider trading while sowing the seeds of the mortgage meltdown.

Mozilo transformed Countrywide into one of the dominant mortgage companies of the housing boom, competing aggressively to offer new types of home loans that allowed borrowers to buy bigger homes that they often couldn’t afford.

The company became the largest mortgage lender in the country, generating hundreds of millions of dollars of wealth for Mozilo, the son of a Bronx butcher. In mid-2008, as Countrywide’s subprime losses threatened its survival, Bank of America bought the firm.

Two years later, Countrywide’s legacy still hangs over the housing market as it struggles to recover amid revelations that many banks, including Bank of America, may have evicted struggling homeowners without regard for their legal rights.

Mozilo’s lawyer declined to comment. As part of the settlement, he neither admitted nor denied wrongdoing.

Under the terms of the SEC settlement, Mozilo must pay a total of $67.5 million. Most of that amount is designed to pay former Countrywide investors who were harmed by the alleged wrongdoing, and will be paid by Bank of America under a Countrywide indemnification agreement with Mozilo. Mozilo is paying about $23 million out of his own pocket as a penalty.

Robert Khuzami, director of the SEC’s enforcement division, said in a statement that the penalty “is the fitting outcome for a corporate executive who deliberately disregarded his duties to investors by concealing a looming disaster in which Countrywide was buckling under the weight of increasing risky mortgage underwriting, mounting defaults and delinquencies, and a deteriorating business model.”

Mozilo’s settlement with the SEC is civil, and he faces no jail time. Whether he’ll ultimately face criminal charges is up in the air. The U.S. attorney in Los Angeles is investigating, according to a person familiar with the matter.Mozilo transformed Countrywide into one of the dominant mortgage companies of the housing boom.