COLUMBUS, Ohio — The Ohio Supreme Court ruled Tuesday that the state’s attempt to tax NASCAR for broadcasting its races in Ohio was unlawful.

At issue before the court was whether the state tax commissioner properly subjected those broadcasts to Ohio’s commercial activities tax during an audit from 2005 to 2010. The tax requires payments on a company’s annual sales.

The court ruled that the Daytona Beach, Florida-based NASCAR’s broadcast revenue, licensing revenue, media revenue and sponsorship fees were wrongly subjected to the tax. Three of the seven justices on the court dissented over licensing fees.

The state had argued that it imposed the tax based on NASCAR’s commercial activity, including the organization’s sale of Ohio broadcast rights. Tuesday’s ruling reverses a Board of Tax Appeals ruling in its favor and sends the organization’s disputed tax bill — which totaled $529,520 — back to the panel to be readjusted.

NASCAR maintained that commercial activities in Ohio such as broadcasting races and selling merchandise are done by other companies that are taxed accordingly.

Applying the tax to NASCAR broadcasts in Ohio was “an unconstitutional expansion of tax liability for out-of-state content providers,” it said.

In an opinion written by Justice Pat DeWine, the court agreed, determining that taxing NASCAR’s broadcasts “did not lie within the tax commissioner’s authority.” That was because its broadcast, media and sponsorship agreements are based on fixed fees that “do not vary with the amount of use.”

On the question of licensing agreements, Justices Melody Stewart, Jennifer Brunner and Michael Donnelly disagreed that they should not be subject to the tax.

They sided with the tax commissioner’s decision to calculate licensing fees separately from sales of NASCAR’s licensed products — flags, mugs, grill covers, keychains, hood ornaments — by its contract holder, BSI Products.

NASCAR had argued that amounted to a double tax.