In 1983, when the state of Maryland began periodically reviewing the cases of children placed in foster homes, state officials asked the Legal Aid Bureau in Baltimore to look into the condition of a small boy identified as L.J.

What the Legal Aid Bureau found would set the agency -- and about 3,000 children placed in foster homes -- on a collision course with the state government, which is responsible for the care and legal representation of foster children.

The bureau sued the state and Baltimore officials, charging that they had neglected a duty to provide safe and secure foster homes and had moved too slowly to return children to their parents or guardians or to find adoptive parents. The class action suit seeks $18 million in damages for five children -- including L.J., who was only 4 or 5 years old when he was first placed in a foster home.

The Legal Aid lawyers alleged that L.J. and the other children were physically or sexually abused while in government-provided foster homes.

L.J. spent five to six years in a home where he was repeatedly beaten with wooden sticks and an electrical cord by a woman described as an alcoholic, according to the lawyers.

This ability of Legal Aid and other nonprofit legal assistance organizations to sue the state -- and some say to represent their clients effectively thereby -- is being called into question by Gov. William Donald Schaefer.

A new contract requirement enacted this month by the Schaefer administration would require that such agencies, as a condition of receiving state funds, agree not to file lawsuits against the state.

Schaefer, at a news conference last week, said he believed that it was wrong for government funds to be used to pay lawyers who end up suing the state.

The stipulation, to be written into all new contracts with three legal services organizations that provide assistance to the poor and the institutionalized, presents a dilemma for those groups, which get 40 to 60 percent of their budgets from Annapolis.

Tomorrow, four contracts with the state held by Legal Aid and the Maryland Disabilities Law Center are set to expire, which could cut access to legal representation for the poor on state assistance programs, the handicapped, the mentally retarded, people in mental institutions and children in juvenile facilities.

But Legal Aid officials said they may not sign the contracts if the state insists on retaining the no-lawsuit clause.

"It is crucial we work out something before Tuesday," said Legal Aid Executive Director Charles H. Dorsey Jr., who, along with officials with the Maryland Disabilities Law Center, has requested a meeting with the governor. "We can't just jettison our clients. I don't know if we would have to look to the private bar to take up our cases."

Some officials question whether legal aid services could agree ethically to such a stipulation. The American Bar Association, in a nonbinding rule, prohibits lawyers from accepting payment from a third-party source if it might interfere with lawyers' "independence of professional judgment" or with the client-lawyer relationship.

Paul V. Carlin, executive director of the Maryland State Bar Association, said he is unsure if that rule would apply in this case but said his organization is "very concerned" and has been "longstanding supporters of providing access to the legal service system without regard to financial means."

The new policy surfaced two weeks ago at a routine meeting of the three-member Board of Public Works, the influential body that approves state contracts. On a 2-to-1 vote, the board approved the Legal Aid Bureau's $269,591 contract with the state Department of Health and Mental Hygiene to provide legal assistance for the mentally handicapped.

Included in the contract was the new stipulation that Legal Aid not bring lawsuits against the state.

Board members Schaefer and state Comptroller Louis L. Goldstein voted for the restrictions, while Maryland Treasurer Lucille Maurer opposed it.

While not naming any organizations directly, Schaefer, who was mayor of Baltimore when the foster home class action suit was filed, has accused legal services organizations of suing first and talking later. In a news conference last week, Schaefer said he was tired of "ambitious young" lawyers filing suit "every time somebody looks around."

The move caught by surprise the heads of legal assistance offices around the state, who denied that they are quick to sue the state. They said internal checks and balances in their organizations, and the high cost of filing suits against the state, have meant that the tool is rarely used.

Some legal aid offices, such as the ones in Prince George's and Wicomico counties, have never brought suit against the state, although figures on the total number of legal aid suits were not available.

"The vast majority of what we do is humdrum work," said Peter M.D. Martin, chief attorney of the administrative law unit of the Legal Aid Bureau's Baltimore office, which has filed most of the class action suits brought against the state. "We represent people in hearings. We call up welfare offices and say, 'Why are you cutting off a person's benefits?' We ask for administrative hearings. Suing is a minuscule amount of what we do. We always negotiate first."

Martin said that before a suit is filed by any of Legal Aid's 14 state offices, it must be approved by a 15-to-20-member litigation team made up of the bureau's chief attorneys or legal experts in the area of dispute. The proposal is then forwarded to Dorsey, who has the power to veto a decision to sue.

Dorsey said there are seven pending class action suits filed against the state since 1971, including cases against the Maryland Department of Corrections on behalf of prison inmates to correct overcrowding and to provide psychiatric facilities for female inmates, and against the Department of Health and Mental Hygiene to release some mentally retarded persons into the general community.

Individual problems, such as the denial of state unemployment benefits, are usually resolved by negotiation and only occasionally result in lawsuits, Dorsey said.

The Maryland Disabilities Law Center has sued to force the state to release mentally retarded people held improperly in mental institutions, to provide special services for the hearing impaired in mental hospitals and to provide special-education classes for children in juvenile delinquency centers.Staff writers Christopher Georges and Sarah Tippit contributed to this report.