Countrywide Financial Corp. co-founder Angelo Mozilo has agreed to a $67.5 million settlement to avoid trial on civil fraud and insider trading charges that alleged he profited from doling out risky mortgages while misleading investors about the risks.

Two other former Countrywide executives also settled before trial next week on charges filed by the Securities and Exchange Commission. But employment agreements that protect the men from lawsuits involving the failed lender mean Bank of America Corp., which bought Countrywide in July 2008, will pick up most of the tab.

The settlement announced Friday spares the executives the risk of a verdict that could have been used against them in lawsuits by shareholders, or by prosecutors if a criminal probe into their activities leads to charges.

It also gives the SEC the right to brag about what it said is the biggest financial penalty ever against a public company's senior executive. The agency has been criticized for doing little to prevent much of the risky behavior that led to the financial meltdown and for failing to detect Bernard Madoff's massive investment fraud.

"This settlement is a desirable result for all the parties," said Jacob Frenkel, a former SEC enforcement attorney now in private practice. "The SEC claims victory. The defendants get closure while preserving their ability to fight" lawsuits by shareholders.

The agreement requires Mozilo to repay $45 million in ill-gotten profits and $22.5 million in civil penalties. Former Countrywide President David Sambol owes $5 million in profits and $520,000 in civil penalties, and former Chief Financial Officer Eric P. Sieracki will pay $130,000 in civil penalties.

It's "the fitting outcome for a corporate executive who deliberately disregarded his duty to investors by hiding what he saw in the executive suite," SEC Enforcement Director Robert Khuzami said in a conference call with reporters.

But $25 million of Mozilo's restitution will come from an escrow fund the company set up to cover shareholder litigation and Mozilo has no obligation to pay the remaining amount, according to the settlement agreement.

The Charlotte, N.C.-based bank, through its Countrywide subsidiary, will pay that $20 million, according to a person familiar with the matter who wasn't authorized to speak publicly and spoke on condition of anonymity.

Sambol's agreement stipulates that his entire $5 million forfeiture will come from the escrow fund.

The payments come on top of an $8.4 billion settlement Bank of America made with 12 states in 2008 over Countrywide's lending practices. The company also agreed in August to pay $600 million to end a class-action case from former Countrywide shareholders.

The penalty represents a striking turn for Mozilo, the son of a Bronx butcher who 41 years ago co-founded what grew into the nation's largest home loan originator. In 2006, Countrywide was writing one in six of the nation's mortgages, totaling more than $490 billion, court records showed.

The Calabasas, Calif.-based company spiraled into disaster as investors suddenly realized many homeowners wouldn't be able to repay mortgages that required no proof of income or down payment, and offered adjustable rates that quickly made monthly payments unaffordable.

Regulators portrayed Countrywide's massive size in court documents as the result of the three executives' single-minded pursuit of market dominance, even if it meant taking disastrous risks.

"The credit losses experienced by Countrywide in 2007 not only were foreseeable by the proposed defendants, they were in fact foreseen at least as early as September 2004," the SEC said in its filing.

The SEC accused the men of misleading shareholders about the quality of the loans on Countrywide's books. The civil complaint also accused Mozilo of acting on his inside knowledge of the company's precarious state when he sold shares between November 2006 and October 2007 ahead of its collapse, reaping more than $139 million.

Under the settlement, the three men did not admit wrongdoing.

"Mr. Sambol has agreed to settle the SEC lawsuit and put the matter behind him for the benefit of his family and loved ones," Sambol's attorney Walter Brown said in a statement.

Sieracki's lawyer, Shirli Fabbri Weiss, said in a news release that all fraud-based claims against her client had been dropped and that his civil penalty was to settle negligence-based charges.

Mozilo, who was not in court when the settlement was announced, was the nation's highest-profile defendant yet to face trial for risky business practices leading to the housing collapse that sent the country into recession.

The SEC wanted to "put his head on a pike and parade it around," said Anthony Sabino, professor of law and business at St. John's University in New York.

Under the settlement, Mozilo agreed to never again serve as an officer or director of a publicly traded company. Sambol agreed not to do so for three years.

Mozilo lawyer David Siegel did not return a message seeking comment.

The settlement talks involving Mozilo were first reported by the Wall Street Journal after U.S. District Judge John F. Walter filed a notice Thursday for trial lawyers to attend a status conference Friday.

Countrywide's lending practices are reportedly also the subject of a criminal probe in Los Angeles. Thom Mrozek, a spokesman for the U.S. attorney's office, declined to comment about the situation.