Mike Snider

USA TODAY

Macy's and the New York City union representing its retail workers have reached a tentative four-year deal, averting a strike that was set to begin Thursday.

About 5,000 members of the local branch of the Retail, Wholesale and Department Store Union had planned to strike if demands for better pay and health care were not addressed. The current contract expired at 12:01 a.m. Thursday.

Macy's and the Local 1-S branch of the RWDSU confirmed that an agreement had been reached. "We are pleased with the outcome of our overnight negotiations and happy to report that a tentative agreement between Macy's and Local 1S for our workers has been reached, therefore averting a possible strike today," Macy's said in a statement.

Macy's (M) shares closed Thursday up 1.3% to $32.36.

The local branch represents Macy's workers at the retailer's flagship Herald Square store on West 34th St. in Manhattan and workers at the Queens, Parkchester and White Plains stores.

Set to be ratified next week, the four-year contract includes wage increases, an improved and more affordable healthcare plan and improved schedules that do not require holiday shifts on holidays such as Thanksgiving and Christmas, the union says. "It raises the bar for what retail jobs can be and should be,” said RWDSU President Stuart Appelbaum in an statement.

The strike drew national attention with Democratic presidential candidate Hillary Clinton and NYC Mayor Bill de Blasio having met with the union.

“We are glad that Macy’s addressed our key concerns in the final hours of negotiations. And we are grateful for all the support we received in this important fight," said Local 1-S President Ken Bordieri said in a statement.

Follow Mike Snider on Twitter: @MikeSnider