Federal prosecutors in Los Angeles have dropped their criminal investigation into Angelo R. Mozilo, the former chief executive of Countrywide Financial, once the nation’s largest mortgage lender, according to a person with direct knowledge of the investigation.

The closure of the case after two years of inquiry follows last October’s settlement by Mr. Mozilo of insider trading allegations made by the Securities and Exchange Commission. Regulators had contended that Mr. Mozilo sold $140 million in Countrywide stock between 2006 and 2007 even as he recognized that his company was faltering. Countrywide and Bank of America paid $45 million of Mr. Mozilo’s $67.5 million settlement, and he was responsible for the rest.

Without admitting or denying wrongdoing, Mr. Mozilo agreed to be banned from serving as an officer or a director of a public company.

The conclusion by prosecutors that Mr. Mozilo, 72, did not engage in criminal conduct while directing Countrywide will likely fuel broad concerns that few high-level executives of financial companies are being held accountable for the actions that led to the financial crisis of 2008.