ANNAPOLIS, JULY 21 -- Maryland Gov. William Donald Schaefer is expected to announce Wednesday that he is dropping his much-criticized plan to cut off state funding to legal aid groups unless they agree not to sue the state.

Schaefer is expected to unveil a compromise agreement with legal aid groups that requires them to negotiate with the state before suing it on behalf of a client, and requires that the state be given "reasonable" notice before filing a lawsuit. Neither negotiation nor notification currently is required. But they are considered standard practice, according to lawyers for the state and legal aid groups.

Sources said the agreement, which was still being prepared late today, also calls for a review of attorneys' fees recovered from the state and calls for a willingness to work with a nonprofit advisory group that is encouraging more help from private attorneys in representing the poor.

Schaefer has come under fire from public interest organizations for his proposal, approved with little discussion at a state Board of Public Works meeting last month, to withhold state funding contracts from two legal services groups unless they agreed not to sue the state on behalf of their clients. Most of those clients are poor, handicapped, mentally retarded, children in juvenile facilities or confined to mental hospitals or prisons.

The governor had said he was fed up with the idea of paying "ambitious" young lawyers to sue the state. "I'm tired of everytime somebody looks around they file suit against you," he said.

Representatives of legal organizations said they were satisfied with the agreement prepared by state Attorney General J. Joseph Curran Jr., but they were reluctant to comment publicly until Schaefer's formal announcement.

The vote by the Board of Public Works, according to legal experts, was the first by any state to make legal services for the poor contingent on a contract that says they cannot sue the state. Legal aid lawyers said the proposal would have hampered efforts to represent people who believe they have been denied social services by the state or have been mistreated in state institutions.

Within a week of the board's vote, and after criticism began, Schaefer appeared to be backing away from his plan, which could have cut state funding to the Legal Aid Bureau, the Legal Services Corp., the Maryland Disabilities Law Center and other nonprofit groups that receive state money. The Board of Public Works, which consists of Schaefer, Comptroller Louis L. Goldstein and Treasurer Lucille Maurer, decided to maintain the organizations' current contracts until a compromise could be found.

Maurer voted against the plan to tie funds to agreements not to sue the state.

Legal aid groups receive about $4 million annually from the state, but representatives of those groups say they rarely seek legal fees in lawsuits won against state agencies and the amounts they have recovered usually have been modest.

One point of the agreement is the creation of a committee to examine lawyers' fees and require that any money awarded for that purpose go toward the cost of representing other indigent clients.

Schaefer's administration also plans to work with a Legal Services Corp. advisory committee, headed by Rep. Benjamin L. Cardin (D-Md.), which is trying to assess how well poor people are represented in Maryland. The committee, formed two months ago, plans to find ways to encourage more private lawyers to represent the poor free of charge or at a reduced rate. The committee also will weigh a proposal that all lawyers be required to participate in what is currently a voluntary escrow fund program that generates money for indigent legal care.