The Illinois Supreme Court struck down the so-called "Amazon tax."
The law was intended to force Internet retailers to collect Illinois sales tax.
Even if such companies didn't have an office or physical store in Illinois, they might have had Illinois "affiliates." That would be a website that linked to a product and got a small kickback for every sale.
In a 6-1 ruling, the Illinois Supreme Court found this was discriminatory under federal tax law. That's because other media, from print newspapers to radio stations, can have similar relationships without having to collect taxes.
Illinois estimates it's missing out on more than $200 million in unpaid sales taxes for online purchases.
The state says it's reviewing the decision and is considering whether to appeal.