(Reuters) - A union representing workers of Macy's Inc <M.N> in New York said it reached a tentative agreement with the department store operator for a new four-year contract, averting a strike that was set to begin on Thursday.

Workers belonging to Retail, Wholesale and Department Store Union had demanded a more affordable health plan, pay increases and changes to scheduling and commissions policies.

They had threatened to walk off the job if a deal was not reached by midnight on Thursday.

The labor union, which represents 5,000 workers at the company's flagship Herald Square store and at Macy's locations in the Bronx, Queens and White Plains, said in a Facebook post that it had reached a deal.

"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 an email to Reuters.

The retailer declined to provide any details of the agreement.

Macy's had placed newspaper ads seeking temporary workers to minimize disruption from a strike and the union had asked them to stop running the ads.

There has not been a strike at Macy's in New York for over 40 years, the union said.

Macy's shares were up nearly 2 percent at $32.50 in premarket trading on Thursday.

(Reporting by Sruthi Ramakrishnan in Bengaluru, Editing by Anil D'Silva)