“That’s what makes this agreement historic,” said Anthony Ciampa, first vice president of the New York State Nurses Association. “We now have a voice in the process and a real say and a real mechanism in which to challenge patterns of staffing shortages and to get those rectified.”

Mr. Ciampa said the contract would provide what the union has failed to achieve through legislation in Albany. California is the only state that requires minimum ratios of nurses to patients in hospitals. Massachusetts voters rejected the idea in a statewide referendum last fall.

The four-year contract with the Mount Sinai, NewYork-Presbyterian and Montefiore hospital systems calls for awarding annual pay raises of 3 percent, filling about 800 vacant nursing jobs, and spending $25 million a year to hire additional nurses. It still must be ratified by the union’s members.

More important to the nurses — and what took them to the brink of striking — was getting the hospitals to concede to the setting of minimum ratios of nurses to patients in each of their treatment units. Nurses in New York have pressed for ratios for years, but they said it took the imminent threat of a strike to extract a compromise from the hospitals.

The ratios that the three hospitals will adopt have not yet been decided. In California, they range from one nurse per patient in operating rooms and trauma units to one nurse for every eight healthy babies in a nursery ward. In New York, as an example, a nurse in a neonatal intensive care unit at NewYork-Presbyterian said the acceptable ratio was at least one nurse for every two babies, but the workload there was often double that.