Washington Hospital Center, the area's largest nonprofit hospital, and Capitol Hill Hospital, a smaller facility that has suffered financial and management problems in recent years, announced yesterday that they are consolidating in an effort to expand services and eventually reduce health-care costs for the public.

Officials at both hospitals said they see the consolidation as the first step in forming a "multi-hospital system" for the Washington area, which could eventually include other hospitals and health-care facilities, such as nursing homes and hospices.

The joint agreement--the first hospital consolidation in the city in 25 years--will become effective July 1.

Both hospitals will retain separate medical staffs and governing boards, but will be under the same holding company and plan to share a number of administrative functions, including purchasing, planning and training.

Both expect to expand free services for the poor as a result of the financial benefits of the consolidation.

"A group of hospitals is clearly stronger than a single institution when it comes to training, joint purchasing, and having access to capital for technological advances or plant improvement," said Grace P. Monaco, chairman of Capitol Hill's board of trustees.

Randall H. Rolfe, Capitol Hill's chief executive officer, said the consolidation grew out of the fact that the two hospitals already have close ties: they use the same radiologists, and a number of Capitol Hill's physicians also serve at the hospital center.

John P. McDaniel, chief executive officer at the 922-bed hospital center, one of the area's busiest facilities, said the center already receives a number of referrals from Capitol Hill. McDaniel said the two facilities are "compatible," in that the 250-bed Capitol Hill Hospital provides general surgery and other traditional forms of health care, while the hospital center has several specialized services, including a coronary and shock trauma unit and a burn center.

A number of financially strapped hospitals throughout the country have merged in recent years as a way of remaining solvent in a time of rising medical costs, said Elworth Taylor, a senior staff member at the American Hospital Association. But officials at both hospitals said their facilities are currently in good financial standing.

Capitol Hill had suffered financial losses in recent years, mainly because of problems with its emergency-room services, Rolfe said. At one point in 1979, the city recommended that fire department ambulances no longer take critically ill or injured patients to Capitol Hill after it was reported that three people had died a short time after they had been discharged from the hospital's emergency room.

At the time, hospital officials considered merging with Greater Southeast Community Hospital as a way of recouping. Today, Capitol Hill has a new chief executive officer, and a new set of physicians runs the emergency room.

McDaniel said both hospitals decided to merge now, rather than "wait until the 11th hour," as a "way of insuring our viability."