In a major blow to the e-commerce industry and small businesses, the Supreme Court held Thursday that out-of-state online retailers can be required to collect and remit state sales taxes wherever they sell their wares.

In a 5-4 decision in South Dakota v. Wayfair, the high court threw out a longstanding precedent that prevented states from reaching beyond their borders to regulate businesses that have no connection to that state, such as having employees or a storefront in that state. Chief Justice John Roberts authored a powerful dissent, highlighting the need for congressional action in this area.

In the ruling, the court abandoned a rule stretching back to 1967 that required a company to have a physical presence in a state to be subject to its sales taxes. The court maintained its physical presence rule against a previous challenge in 1992, offering an impetus to the fledgling e-commerce industry in the early 1990s. Since then, the internet retail market has grown to almost $500 billion in 2018.

Adding uncertainty about sales taxes and changing the way that the e-commerce market operates could seriously hamper the growth of the industry. As Roberts pointed out in his dissent, “E-commerce has grown into a significant and vibrant part of our national economy against the backdrop of established rules, including the physical-presence rule.”

E-commerce giants like Amazon and Walmart will not suffer from this ruling, as they already collect and remit state sales taxes due to having a physical presence in states across the country.

Unfortunately, small businesses will suffer the most from the ruling. Roberts explained:

One vitalizing effect of the Internet has been connecting small, even ‘micro’ businesses to potential buyers across the nation. People starting a business selling their embroidered pillowcases or carved decoys can offer their wares throughout the country—but probably not if they have to figure out the tax due on every sale.

Most small businesses are not equipped to handle being subject to every taxing authority in every location where they have a customer. There are more than 10,000 state and local taxing jurisdictions in the country. And these jurisdictions have different tax rates, rules governing tax exemptions, product category definitions, and standards for determining whether an out-of-state seller is subject to sales tax in the first place.

Roberts pointed to a few examples of how confusing state taxes can be:

New Jersey knitters pay sales tax on yarn purchased for art projects, but not on yarn earmarked for sweaters … Texas taxes sales of plain deodorant at 6.25 percent but imposes no tax on deodorant with antiperspirant … Illinois categorizes Twix and Snickers bars—chocolate-and-caramel confections usually displayed side-by-side in the candy aisle—as food and candy, respectively (Twix have flour; Snickers don’t), and taxes them differently.

Further, the cost of compliance is beyond the means of most small businesses. Implementation and integration of software to calculate taxes in all these jurisdictions alone is estimated to cost up to $250,000.

The good news is that, under its authority to regulate interstate commerce, Congress has the power to fix this problem. Congress is the branch of government best able to consider the competing interests at stake, not unelected federal judges.

Congress should codify the physical presence rule to protect small businesses from being subject to mandates from states where they have no physical connection and whose policymakers face no accountability for the tax and regulatory costs that they impose on out-of-state businesses.

If state borders truly do matter, Congress must limit states’ ability to reach beyond their borders to place regulatory burdens on out-of-state businesses.

>>> Listen to “SCOTUS 101”: Elizabeth Slattery and Tiffany Bates bring you up to speed on their Supreme Court podcast.