NEW YORK (AP) — A possible strike by thousands of New York City nurses loomed Monday even as nurses at one hospital reached a tentative agreement hours before their contract was set to expire.

The pact affecting 4,000 nurses at NewYork-Presbyterian Hospital awaits ratification.

Contract talks between nurses and seven other hospitals will resume this week to avert a strike by 12,000 other nurses as early as next Monday, Jan. 9. Their contracts expired Tuesday.

“Striking is always a last resort, but nurses say they are prepared to strike if hospital administration gives them no other option to protect their patients and their practice,” the New York State Nurses Association said in a statement over the weekend.

The union issued a 10-day notice that it intends to strike if an agreement isn’t reached. The advance notice is required by law to give hospitals to arrange for alternative staffing.

The nurses have been calling for what they described as safe staffing levels, fair wages, no cuts to their health coverage, and health and safety protections in light of the “tripledemic” of COVID-19, RSV and flu.

They also want community benefits such as funding programs to recruit and train nurses from within the communities they serve.

The seven hospitals where the nurses could strike include Montefiore, Mount Sinai Hospital, Mount Sinai Morningside and West, Maimonides, BronxCare, Richmond University Medical Center, and Flushing Hospital Medical Center.

Representatives of several hospitals said Friday they remained hopeful contract agreements will be reached before a strike but said they are prepared to bring in outside workers as a precaution as they face high patient volume because of the triple health threats.

The union congratulated its members at NewYork-Presbyterian Hospital on reaching a tentative agreement on what it called “a fair contract” hours before their contract expired.

The hospital said it was pleased to have reached a tentative agreement.

“With this agreement, which is still subject to ratification by the nurses, we are making a significant investment in our outstanding nursing team and ensuring that we can continue to deliver the highest level of care to our patients,” the hospital said in a statement.