Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Supreme Court agreed Friday to decide if states should be able to collect taxes on internet sales, which would generate billions in revenue for local governments, but also raise the cost of online shopping for consumers.

Just over a quarter-century ago, the court ruled that a state could not force mail order catalog companies to collect sales taxes unless they had a physical presence in the state. Led by South Dakota, 36 states want the court to take another look at the issue, arguing that the 1992 decision was issued "before Amazon was even selling books out of Jeff Bezos's garage."

Part of the court's logic was that it would be too difficult for mail order companies to compute the widely varying tax rates among, and even within, the 50 states.

But lawyers for South Dakota said that's no longer an issue in the digital age. "Advances in computing have made it easy for retailers to collect different states' sales taxes," they wrote in a court brief.

Related: Supreme Court to hear case of lawyer who defied client in murder trial

Internet companies "can instantly tailor their marketing and overnight delivery of hundreds of thousands of products to individual customers based on their IP addresses. These companies can surely calculate sales tax from a zip code," the state said.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

The states also said the current ban on internet sales taxes puts brick-and-mortar retailers, who have to collect sales taxes, at a disadvantage.

Congress has considered a plan to allow states to collect taxes on purchases made by their residents through out-of-state companies, but no legislation has passed.

Lawyers for the states said they're losing nearly $34 billion a year because of the physical presence rule, though estimates from the federal Government Accountability Office said the figure is much smaller.

The case came to the Supreme Court after South Dakota passed an Internet tax law in 2016. Hoping to launch a legal battle that would lead the Supreme Court to reconsider its 1992 decision, the state sued out-of-state Internet retailers. Bound by the earlier ruling, the South Dakota supreme court ruled against the state

In response, the internet companies said collecting taxes is vastly more complicated and expensive than it was in 1992, because the number of local taxing entities has more than doubled.

They noted that Amazon, the nation's largest online retailer, now collects sales taxes for purchases made in every state, even though it has a physical presence in only a few. That's proof that "the 'problem' of uncollected taxes," the retailers involved in the case said in their court brief, "has proven to be largely self-correcting."

They urged the Supreme Court to stay out of the fight while Congress is considering what to do. The court will hear the case this spring.

While Amazon is not affected by the suit, other online retailers including Overstock.com, home goods company Wayfair and electronics retailer Newegg, are part of the case.

Overstock.com said in a statement Friday that it "looks forward to the opportunity to convince the Supreme Court to confirm its prior rulings protecting the free flow of interstate commerce from overreaching state tax laws."

The National Retail Federation, which represents both internet and brick-and-mortar sellers, said Friday it welcomed the Supreme Court's decision to take the case.

"Unfortunately, antiquated sales tax collection rules have resulted in an uneven playing field that's making it harder for Main Street retailers to compete in today's digital economy. This is a basic question about fairness, which all of our members deserve whether they're selling in stores or online," federation president Matthew Shay said in a statement.