A 1986 law has come back to haunt Beacon Hill. The “tax cap law” limits the amount of tax revenue a state can keep — meaning that about $3 billion of the state’s nearly $5 billion tax surplus will be returned to taxpayers.

Across the board, state taxpayers will receive about 13% of what they paid, allowing for higher earners to see higher returns while those with lower wages will receive next to nothing. It’s prompted a fierce debate over the law’s fairness.

“Why is the Legislature — why are those members, those 200 members — smarter than the voters who voted this in previously?” asked Jennifer Nassour, former chair of the Massachusetts Republican Party and founder and president of the Pocketbook Project, a nonprofit devoted to electing right-of-center female candidates. “The law is the law.”

But state Sen. Sonia Chang-Díaz argued the State House should revisit legislation that stalled after legislators learned about the tax-cap law. A more than $4 billion package would offer $250 one-time tax rebates to some residents, make permanent changes to the tax code and put hundreds of millions of dollars toward areas like housing, child care and health care.

“This is a once-in-a-lifetime opportunity for Massachusetts to take a quantum leap or two on some of the things that voters have been telling Beacon Hill for a long time that they want to see us do,” Chang-Díaz said, referencing that at least a portion of the money could be used to address transportation issues, racial and economic wealth divides, housing unaffordability and mental health care in the state.

An analysis from the Massachusetts Budget & Policy Center shows that, under the tax cap law, residents who made $1 million or more last year will receive at least $22,000 back. But the bottom 20% of earners, below $31,000, will get just $9.

“One of the things we need to clarify is: the people who get more money back are also the people who paid more in taxes,” Nassour said. “And so they’re owed what they paid erroneously.”

Chang-Díaz disagreed, pointing to the economic relief bill as a better model.

“Should we send some that money back to taxpayers? Yes. And that’s what the Legislature — both the House and the Senate — voted to do in July,” she said. “But is it responsible budgeting to route $3 billion through this automatic formula that nobody’s talked about or looked at in nearly 40 years? I just don’t believe it is.