The Senate approved a bill yesterday to transfer St. Elizabeths Hospital from the federal government to the District, but amended it so that Congress would have to approve any plans by the city to use property there for anything other than mental health purposes.

The House, which passed the St. Elizabeths legislation once this week, will have to approve it again with the added amendment before the bill can be sent to the president. The House is expected to pass the measure as amended next week, congressional aides said.

The White House supports the legislation to transfer St. Elizabeths.

The compromise, hammered out over recent months during intense negotiations between the federal and District governments and the hospital employes' union, will resolve a longstanding controversy over the future of the massive 127-year-old facility.

The federal government has been trying for years to turn over St. Elizabeths to the District government, which has said it does not want it and cannot afford it.

The hospital complex consists of 104 buildings on 336 acres of land in Southeast Washington, and has 1,700 inpatients.

Under the House-approved version, the city would have all the hospital property transferred to it in October 1987, and property the city did not need for mental health programs could be used in any way consistent with the historical landmark designation of the site.

Under the amendment added yesterday by Sen. Thomas Eagleton (D-Mo.), in October 1987 the District would get only the property that it determines it will need for mental health programs.

By October 1991, the District would submit a plan to Congress for use of any surplus land. Congress would have to approve the plan by joint resolution before it could be implemented. If Congress did not approve a plan, the land not used for mental health would remain federal property.

Mayor Marion Barry agreed to the amendment after negotiating Thursday night with Eagleton about his concerns over future development, aides said.

The Senate approved the measure with the amendment by unanimous consent as one of its last items of business before adjourning until Tuesday.

Eagleton said in prepared remarks that he would like to see the excess land used for a major park.

"However, there are other development needs in the city and the region, and perhaps a park would not be the 'best use,' " he said, adding that "all interested agencies should agree on what to do with the remaining acreage -- be it parks, federal use, schools, housing or commercial development."

The legislation provides for a total of$219 million in federal funds between fiscal 1986 and 1991 for transition costs, then the federal government would be released of financial responsibility for the hospital.

The District government would have to develop and implement a comprehensive mental health-care system by October 1991, designed to get as many patients as possible out of the massive institution and into community settings.

When the transfer is achieved and the future placement of patients determined, St. Elizabeths is expected to be a smaller institution and mental health services would be provided in a less centralized way.

Current hospital employes would be given priority hiring in the new D.C. system and would be guaranteed their seniority, pay and benefits if they go into the new system. But it is unclear how many would be hired to work in the new system or by mental health contractors.

St. Elizabeths has faced financial crises for years as the federal and city governments have sparred over what share of the hospital's cost each was responsible for paying.