The union representing 17,000 workers at Safeway and Giant Food stores says it has reached a tentative agreement on a new labor contract two days before the current one was set to expire. (David Paul Morris/Bloomberg)

The union representing workers at Safeway and Giant Food said Thursday it reached a tentative agreement on a new labor contract two days before the current one was set to expire.

Mark Federici, secretary and treasurer of the United Food and Commercial Workers Local 400, said after more than a month of bargaining the two sides came to deal that could be presented to his 17,000 members. He declined to give details of the agreement until union members reviewed it, but said that health care, wages and pensions were among the key issues.

“Negotiations were much more difficult than four years ago,” Federici said. “The fundamental reality of the economy is night and day.”

Union members are scheduled to vote on the agreement at the D.C. Armory on Tuesday. Neither Safeway nor Giant will close its stores to allow members to vote, but all workers interested in attending the meeting can ask to be scheduled accordingly.

Officials for both supermarket chains, the two largest in the Washington region, confirmed that a tentative deal had been reached, but declined to comment further.

The threat of a strike loomed over the final days of negotiations. The union spent the past few weeks rallying public support by holding demonstrations throughout the region.

Tensions grew as Safeway and Giant hired temporary employees to man the stores in case union workers walked off the job — a tactic used in 2008 during the last contract negotiations. Company officials at Safeway said those replacement workers will remain on standby until the agreement is ratified by union members.

A majority of union members in attendance must vote in favor of the agreement for it to be ratified. If rejected, two-thirds of members must vote to authorize a strike.

The new contract would come nearly a year after workers at a Giant warehouse in Jessup ratified an agreement to ensure that the site would not be shuttered. Those members of Teamsters Local 730 accepted a 40 percent reduction in staff, with the assurance that employees would be offered buyouts or jobs in other parts of the company.

Reducing labor costs has been a key concern of Giant and Safeway as nonunion retailers such as Wal-Mart expand.

“We’re optimistic and hopeful that [Giant and Safeway] will remain successful. [We only ask] that they continue to allow us to share in that success,” Federici said.

To be sure, Safeway and Giant still reign supreme in the local supermarket world. They had a combined market share of 39 percent in the Washington area in 2011, compared with 38.5 percent a year earlier, according to Food World, a local trade magazine . Safeway is based in California; Giant, based in Landover, is owned by Dutch firm Royal Ahold.

Wal-Mart, with 33 percent of the national grocery market, has about a 4 percent share locally that stands to rise once it rolls out six new stores in the District in the next few years. Pharmacy chains CVS and Walgreens have also upped the ante by expanding their food offerings, while other nonunion shops — such as Harris Teeter and Wegmans — are opening more locations.

“Virtually everybody who is new on the block in food retailing has entered the market [as] nonunion,” said Jeffrey Metzger, publisher of Food World.

Only four of the top 10 chains selling groceries in the Baltimore-Washington area, including Costco and Shoppers Food Warehouse, are under union contacts, according to a market study by the magazine. Nine of the top 10 local supermarkets were union 30 years ago — some stores closed, others lost ground to Giant and Safeway.

Workers at the unionized grocers are still paid more. In 2011, the average hourly wage for cashiers in the region was $10.39, according to the Bureau of Labor Statistics. By comparison, the average hourly wage for all union-covered employees at Giant and Safeway is roughly $12.

Still, the pay at union shops is coming down because the number of full-time veteran employees are declining through buyouts and retirements. They are being replaced by part-timers and new workers who are being paid less.