D.C. Mayor Vincent Gray announced Thursday that he would veto a city council bill that would have singled out the retail giant Walmart and forced it to pay a minimum $12.50 hourly wage, far above the district's $8.25 minimum hourly wage for other businesses.

In a letter to the council, Gray said the law would be a "job killer" for the city that would eliminate more than 4,000 positions in the first years of its enactment.

"I feel compelled to veto this bill ... because it will not improve employment opportunities or wages for the vast majority of our workforce. To the contrary, it will result in significant harm to the residents and areas of the District most in need of jobs, economic development, and new amenities," Gray wrote.

At the same time, the mayor said that he would be open to raising the city's minimum wage across the board and indicated the city council should put that on its agenda.

The city council passed the law -- called the Large Retailer Accountability Act of 2013 -- in July. The council had initially welcomed Walmart's plans to bring six stores in the city only to make a sharp about face after heavy lobbying by Big Labor and other activist groups opposed to the nonunion retail giant.

The bill was specifically written to affect only large retail chains such as Walmart and, as Gray noted, exempted the ones that are already union-organized. Walmart reacted by suspending construction on three store sites and vowing to cancel plans for the rest if the bill passed.

The council ignored the threat. “We’re at a point where we don’t need retailers. Retailers need us,” said Vincent Orange, a Democratic at-large councilman and the bill’s leading advocate at the time.

That left the matter up to Gray. In his letter he denied he had been pressured by Walmart and said that the "vast majority of District residents" had urged him to veto the measure.

Organized labor has been fighting a running battle with the non-union retailer for years and has recently stepped up its activities. Promoting so-called "living wage" laws like the District's has been one of its tactics.

The laws essentially force businesses to pay the kind of wages they would have to if their workers were unionized. This creates a “well, what’s the difference?” situation for the businesses when unions try to organize their workers.

Despite the veto, Walmart critics will likely consider this a partial win given that Gray has urged the council to raise the minimum wage overall, which is one of the goals of the living wage movement.