A luxury developer in Queens and Brooklyn that benefited from a controversial tax break will pay $3 million to settle claims that it shorted building workers on their pay, Attorney General Letitia James announced Thursday.

Heatherwood Properties was accused of flouting part of its obligation upon receiving the 421-a tax exemption to pay 24 workers at its Long Island City and Williamsburg buildings the prevailing wage over several years, dating back to 2011, according to the settlement. The tax exemption expired in Albany in June.

“Heatherwood pledged that it would pay workers their prevailing wage as a condition to receive the tax break,” James said at a Thursday press conference alongside City Comptroller Brad Lander and members of 32BJ SEIU, the property service workers union representing the workers. “Instead, Heatherwood took advantage of the system.”

James said workers had only been paid 41% of what they were owed. Workers will receive more than $720,000 in unpaid wages and interest, and the bulk of the remaining funds will go to the city and state as penalties.

“What they were doing was wrong,” said Elizabeth Hernandez, one of the workers at the property in Williamsburg, of her former employer. “All workers deserve dignity and respect.”

This summer, 421-a expired after years of contentious debate between progressives who slammed it as a costly handout to the real estate industry and developers who said the rebates were essential to the creation of new housing.

Lander had vociferously opposed an extension of 421-a leading up to its expiration. A proposed replacement from Gov. Kathy Hochul that largely mirrored the original exemption failed to gain traction from legislators in Albany, who ultimately let it sunset in June.

James on Thursday said developers who benefited from the exemption are still subject to the associated legal requirements.

“Twenty-four workers — janitorial staff, concierge staff, individuals who represent the salt of the earth — their wages were stolen,” James said.

The law firm representing Heatherwood declined to comment.