The Supreme Court announced Tuesday that it will hear arguments in a Maryland case that could rewrite tax laws across the country and cost Montgomery County and other localities hundreds of millions in revenue if it decides for the plaintiffs.

The issue in Maryland v. Wynne is the extent to which a state can tax income that residents earn in another state. Maryland allows residents to deduct income taxes paid to other states on their Maryland income tax forms. But that deduction doesn’t apply to income tax the state collects on behalf of counties and some municipalities — what is known as the piggyback tax.

The Maryland Court of Appeals ruled last year that providing the credit for state income tax but not county income tax violates the U.S. Constitution’s commerce clause.

Montgomery officials estimate that if the court upholds the ruling, the county could be liable for as much as $150 million in past claims and could lose $25 million a year in revenue going forward.

As a precaution against an unfavorable ruling, County Executive Isiah Leggett (D) lowered tax revenue projections by $85 million in his proposed fiscal 2015 budget. He also set aside $15.7 million in a separate reserve fund.

But in final action on the budget last week, the council, which has the last word on spending matters, elected to use the $15.7 million to fund programs for the fiscal year that will begin July 1.

Leggett expressed concern about the council’s action and said Wynne represents a huge potential financial setback to the county.

“I just have some reservations,” Leggett said. “I would hope that we never have to pay anything for Wynne, but [the council’s action] places some risk there. Many legal experts say we might get an adverse ruling.”

This year, when it was considering whether to hear the matter, the court asked the Obama administration for its views. Solicitor General Donald B. Verrilli Jr. urged the court to take the case, in part to clear up conflicting state court rulings on the issue.

“The [Maryland Court of Appeals] decision . . . has significant financial consequences for Maryland; may lead to challenges to similar tax schemes in other jurisdictions; and is inconsistent with statements made by the highest courts in other states,” Verrilli wrote last month. “This case is a suitable vehicle for addressing the question presented.”

In the case, a Howard County couple, Brian and Karen Wynne, challenged their Maryland tax bill after they were prevented from deducting $84,000 they had paid in income taxes to other states from the income used to calculate their county tax bill.