New Jersey is joining a legal battle to stop neighboring states from taxing residents who are working from home.

The shift to remote work amid Covid-19 led New Hampshire to file a lawsuit in October, seeking to bar Massachusetts from taxing people who stopped commuting to the state for work because of the outbreak. More than a dozen other states have since filed amicus curiae, or friend-of-the-court, briefs urging the U.S. Supreme Court to take up New Hampshire’s challenge. New Jersey, along with Connecticut, Hawaii and Iowa, filed their own on Dec. 22.

At stake for New Jersey is as much as $1.2 billion credited to its residents for income taxes paid to New York. Before the pandemic, more than 400,000 residents of New Jersey commuted to jobs in New York City. With many of these people now working remotely, their taxes are “more fairly attributed to New Jersey,” state Treasurer Elizabeth Maher Muoio said in a statement.

“The resolution of this case thus has far-reaching implications as to which states will collect billions in revenue during the pandemic,” New Jersey wrote in its brief.

Seven states currently tax people where their office is, even if they work remotely. According to New York’s taxation website, any nonresident whose primary office is in the state but is telecommuting is still considered to be working in the state. Many states, including New Jersey, provide a tax credit to eliminate “double taxation” of a person’s income.

The issue has gained importance since the outbreak began, with many offices closed and employees working from home, and many states facing budget deficits.

Such taxes “contain no mechanism to prevent double taxation if the taxpayer’s home state does not allow a credit,” New Jersey wrote in its brief. It “results not only in an unconstitutional windfall, but diverts the revenues that home states would otherwise receive.”

The case is New Hampshire v. Massachusetts, 22O154.

This article was provided by Bloomberg News.