SANTA ANA, Calif. (AP) _ Merrill Lynch & Co. said today it will pay $30 million to end a criminal probe into the brokerage firm's role in the 1994 Orange County bankruptcy.

The company did not admit wrongdoing under the deal with the Orange County district attorney's office that was announced today. The agreement will not affect the county's $2 billion civil damage lawsuit against Merrill.

At issue is who is to blame for the county's disastrous investment policy. When it declared bankruptcy in December 1994, the prosperous county south of Los Angeles revealed its treasury had lost $1.64 billion in risky bond deals. The county returned to solvency last summer after sharply cutting government services and taking on 30 years worth of debt.

Under the agreement, the nation's largest investment house will pay $27 million to Orange County and will reimburse the county and the state $3 million for the investigation by the district attorney's office.

Merrill Lynch also agreed to implement changes in training and procedures to prevent a repeat of the debacle. The firm said it agreed to the deal to avoid ``the substantial costs and distraction of protracted litigation.''

``We continue to believe that we acted properly and professionally in all facets of our relationship with Orange County,'' the company said in a statement.

The county claimed Merrill Lynch set former county Treasurer Robert L. Citron on an investment strategy so risky that it was illegal on its face.

Merrill Lynch has denied wrongdoing, saying it warned Citron repeatedly of the risks and the financial disaster was of his own making.

Citron pleaded guilty to securities fraud and misappropriation of funds in April 1995. He was sentenced to a year in county jail and ordered to pay a $100,000 fine.

His top assistant, Matthew R. Raabe, was convicted of the same charges in April. He will be sentenced this summer.

``The settlement will bring to a close to the investigation conducted by the Orange County district attorney's office into the matter,'' Orange County District Attorney Michael Capizzi said.

However, Merrill Lynch still faces an investigation by the U.S. Securities and Exchange Commission in connection with the bankruptcy.

Since late last week, attorneys for Merrill Lynch and top members of the district attorney's staff had been locked in negotiations over the criminal probe.

Capizzi's prosecutors reportedly had ordered numerous Merrill executives to appear before the county grand jury. The panel had been expected to weigh an indictment request before its term ended on June 30.

If the county had pursued a criminal case, it would have been lengthy and expensive and would have ended in no more than a fine for the company, Capizzi said.

When the grand jury began its 18-month term, prosecutors were reportedly exploring several aspects of the relationship between Merrill Lynch and the county, including whether proper disclosures were made to the buyers of county bonds that the firm underwrote.

With the deal, more than 5,000 pages of grand jury testimony by Merrill Lynch executives and officials of other municipal finance firms will be sealed from the media and public forever.