PHOENIX — State officials and mental health advocates approved a deal today to provide more services for the seriously mentally ill, bringing to an end a 33-year-old lawsuit.

The agreement sets out a series of what the state must provide to the more than 13,000 individuals in Maricopa County who need services but are not impaired enough to be institutionalized. These range from everything from medications to supportive employment services.

But while the pact legally is limited to Maricopa County, Don Hughes, the health adviser to Gov. Jan Brewer, said the same services will be made available statewide.

Brewer, who has been dealing with the issue since her first days as a legislator, called the deal "landmark.''

There have been various efforts since the lawsuit was filed in 1981 — and since a judge ruled the state was breaking the law several years later — to resolve the litigation. That included various promises by state officials to do a better job of meeting their legal obligations.

All of the tentative pacts, however, have fallen short, resulting in attorneys going back to court.

But this agreement, which is being supported by the Arizona Center for Law in the Public Interest, is expected to stick.

Brewer said no additional state funds will be required beyond the additional dollars lawmakers provided two years ago when the first tentative agreement was reached. She said part of that is because many of those who need services will be able to get them through an expanded Medicaid program which she championed.

The lawsuit traces its roots to the 1970s when Arizona, like many other states, decided to deinstitutionalize the mentally ill. The idea was to provide care in the community rather than have people "warehoused'' in the Arizona State Hospital.

But Maricopa County Superior Court Judge Bernard Dougherty ruled in 1985 these people were simply released from the hospital, with the state never setting up and funding services those people needed to survive.

The resultwas that many former state hospital patients ended up living on the streets or getting arrested.

Dougherty ordered the state to provide the "continuum of care'' for the chronically mentally ill as it had promised.