Visitors line up to enter the Supreme Court. (J. Scott Applewhite/AP)

Maryland’s acting solicitor general told the Supreme Court on Wednesday that the state has the right to tax all income that residents earn in other states in order to help pay for local government services they enjoy, such as schools and police and fire protection.

Maryland allows shareholders of some companies a credit on their state income tax returns for taxes paid in other states. But that credit does not apply to the “piggy­back tax” — the segment of the income tax that Maryland collects and distributes to its 23 counties and Baltimore City.

A Howard County couple, Brian and Karen Wynne, are challenging that policy. In 2006, the Wynnes held a 2.4 percent stake in Maxim Health Care Services, a Howard-based home-care and medical staffing company doing business in 39 states. About half of the Wynnes’ $2.7 million income that year came from their share of Maxim’s distributions of out-of-state earnings.

The Wynnes claimed an $84,550 Maryland credit for taxes paid in those states. But Maryland officials disallowed a credit against Howard’s 3.2 percent piggyback income tax. As a result, the Wynnes contend, they were subjected to about $25,000 in illegal double taxation.

The Wynnes’ attorney, Dominic Perella, said Maryland’s failure to extend the full credit makes the state “an outlier.”

“This is a problem that only Maryland has,” Perrella said. “Every other state with an income tax allows the credit in full.”

The Maryland Court of Appeals found last year that withholding part of the tax credit violated the Commerce Clause of the U.S Constitution by discriminating against interstate commerce. In May, the Supreme Court agreed to Maryland’s request that it review the case, Comptroller of the Treasury of Maryland v. Brian Wynne .

William Brockman, Maryland’s acting solicitor general, told justices during the hour of oral argument that states have the sovereign right to tax the income of residents no matter where that income is earned. The exclusion of a credit against county income tax, he said, is an effort to ensure that all residents pay a fair share for the benefits that local governments provide, regardless of where they made their money.

“You don’t get 18 percent of a firetruck or a day of school because you earned 82 percent elsewhere” Brockman said. “You get 100 percent just like your neighbor does.”

State officials estimate that Maryland counties collectively stand to lose more than $40 million a year in tax revenue and $250 million in claims for refunds and interest should the court find in favor of the Wynnes.

Montgomery County, because of its size and wealth, would bear the brunt of the revenue loss, according to the state’s Bureau of Revenue Estimates. The county could lose $25 million annually and be liable for $150 million in back claims.

Brockman’s argument drew skeptical responses from some justices, who said it discourages Maryland residents from doing business outside the state.

“What you’ve done operates exactly like a tariff,” said Justice Samuel A. Alito Jr., “because it provides an incentive to earn income in Maryland and not outside of Maryland. . . . Why shouldn’t this tax system meet exactly the same fate as a tariff?”

Brockman also argued that although residents with out-of-state business interests may pay more in taxes, Maryland should not have to alter its tax system because of policies in other states.

“You’re on the principle that life is not fair, right?” asked Justice Antonin Scalia.

“Life is not fair. Maryland taxes are,” Brockman replied, drawing laughter from the audience in the chamber.

Perella pointed out in his brief that, even with the credits the Wynnes seek, they would pay a substantial amount taxes: $42,000 to Maryland and $81,000 to Howard County.

The Obama administration supports Maryland’s position. In a friend-of-the-court brief, Solicitor General Donald B. Verrilli Jr. said the Wynnes’ argument was a misreading of the Commerce Clause that would upend decades of tax law.

“If the Commerce Clause required States to forgo residential income tax revenue whenever a resident pays out of state income taxes, a longstanding and significant principle of this Court’s state taxation jurisprudence would be a virtual dead letter,” Verrilli said in the brief.

A large contingent of state and local government advocacy organizations lined up with Maryland on the case, including the International Municipal Lawyers Association and the National Conference of State Legislatures.