By SAM HANANEL
WASHINGTON (AP) -- The Supreme Court on Monday struck down as unconstitutional a Maryland tax that has the effect of double-taxing income residents earn in other states.
Maryland officials say the 5-4 ruling means the loss of hundreds of millions of dollars in tax revenues. It also could affect similar tax laws in nearly 5,000 local jurisdictions in other states, including New York, Indiana, Pennsylvania and Ohio.
The justices agreed with a lower court that the tax is invalid because it discourages Maryland residents from earning money outside the state.
The unusual split wasn't along ideological lines. Writing for the court, Justice Samuel Alito said the tax "is inherently discriminatory" under the Constitution's Commerce Clause. The court has interpreted that provision to ban states from passing laws that burden interstate commerce.
Alito was joined by Chief Justice John Roberts and Justices Anthony Kennedy, Stephen Breyer and Sonia Sotomayor.
Maryland allowed its residents to deduct income taxes paid to other states from their Maryland state tax, but it did not apply that deduction to a local "piggy back" tax collected for counties and some city governments.
Maryland officials argued that the state has authority to tax all the income its residents earn to pay for local services like public schools.
The case arose after Maryland residents Brian and Karen Wynne challenged their tax bill. They had been blocked from deducting $84,550 that they had paid in income taxes to 39 other states. Brian Wynne's out-of-state income resulted from his ownership stake in a health care company that operates nationwide.
The Wynnes argued that Maryland was unfairly subjecting them to double taxation and taxing earnings that have no connection to the state.
Maryland's highest court ruled in 2013 that the tax violates the Constitution's Commerce Clause.
Maryland officials have said an adverse ruling could cost local governments in the state $45 million to $50 million annually and warned that Maryland might have to refund up to $120 million in taxes.
In dissent, Justice Ruth Bader Ginsburg said nothing in the Constitution requires a state to avoid taxing its residents just because another state has a similar tax regime targeting the same income. She was joined in dissent by Justices Antonin Scalia and Elena Kagan.
Scalia also wrote separately to note his longtime opposition to "a judge-invented rule under which judges may set aside state laws that they think impose too much of a burden on interstate commerce." Clarence Thomas wrote separately to say the Commerce Clause cannot be used to strike down a state law.