Talks between the union representing 4,000 workers at four New York City area Macy's Inc stores, including its Herald Square flagship, and the company could continue past the midnight deadline on Wednesday to avert a strike at Macy's for the first time since 1972.

The union is demanding better wages, pension and health benefits, and hours, saying that the department store chain's recent sales and profit gains warrant improvements in their work conditions.

A union representative told Reuters that talks were still going on 10:30 pm ET and would likely continue past the midnight deadline, with a view to reaching a tentative deal by morning.

Any deal would then be put to a vote by union members, starting with the flagship's workers.

It's a good sign that after intense negotiations, you still have both sides at the table, the spokesman for the Retail, Wholesale, and Department Store Union (RWDSU), Dan Morris, told Reuters earlier on Wednesday.

A spokeswoman for Macy's did not immediately return a call for comment.

The current contract, signed in 2006, was extended by 45 days in early May, but expires at 11:59 p.m. EDT on Wednesday. Talks are expected to go down to the wire.

Some workers at Macy's 1 million-square-foot flagship store in midtown Manhattan expressed ambivalence about a strike but said it might be a necessary evil.

It's either we give up short term for long term. Or we work today and we struggle long-term, said Troy Mitchell, a 14-year employee of the Macy's in Manhattan, where he works in the men's clothing section.

If workers called a strike, the union, which is affiliated with the United Food and Commercial Workers, said it would be ready to picket and hand out leaflets at the Manhattan store, and the other locations in the New York City boroughs of The Bronx and Queens and in New York State's Westchester County, this week.

Macy's took an ad in Sunday's New York Times looking for temporary sales staff in anticipation of a possible labor dispute.

Last month, Macy's raised its profit forecast for the rest of the year, and its debt regained investment grade status from rating agency Standard & Poor's after two years.

The labor dispute comes amid moves by workers at other retailers and restaurants seeking to unionize. The UFCW is trying to organize 5,000 workers at 27 Target Corp stores in the New York City area.

Employees of a Target store in Valley Stream, New York, will vote on Friday on whether to join a union. It would be the first Target store to unionize.

This increased activism among retail workers reflects growing frustration at not getting better contracts despite retailers' improving sales, according to one labor relations specialist.

The unions are saying: 'We really have to fight back, said Cornell University professor Kate Bronfenbrenner. The recession has continued for workers, but it hasn't for corporations. They're doing better.

Still, high unemployment is also on many workers' minds. Recent efforts to unionize at Starbucks Corp and sandwich chain Jimmy John's have failed.

(Editing by Gerald E. McCormick and Muralikumar Anantharaman)