PIERRE, S.D. (KELO) — Come next July internet customers in South Dakota and other states won’t have to pay sales tax on internet services any longer.

That’s because of federal legislation that U.S. Senator John Thune of South Dakota helped pass three years ago.

But they will have to pay sales and use taxes on goods and services bought over the internet.

Confused? Read on.

President Barack Obama signed the Trade Facilitation and Trade Enforcement Act of 2015 into law February 24, 2016. Among its 382 pages of provisions was a requirement, once known as the Internet Tax Freedom Act, that states and localities couldn’t tax internet services effective July 1, 2020.

The internet-services tax repeal didn’t draw a lot of attention at the time, in part because it directly affected only seven of the 50 states.

Last year, in a fight that had nationwide impact, the U.S. Supreme Court in the Wayfair case ruled in favor of South Dakota’s state government to charge sales and use tax on goods and services sold over the internet.

Many state governments hurried in the 14 months since to rewrite state tax laws to boost their revenue streams.

The two decisions share a word — internet — but their effects were opposite.

The federal Internet Tax Freedom Act took authority away from state governments to tax monthly subscription fees for fixed and mobile internet access.

For decades seven states that directly taxed internet services in 1998 — Hawaii, New Mexico, North Dakota, Ohio, South Dakota, Texas and Wisconsin — had been allowed to continue doing it.

Now their authority will permanently expire after June 30, 2020.

In South Dakota, the loss of tax revenue because of the Internet Tax Freedom Act from 2016 means the state treasury’s gain from the 2018 Wayfair decision won’t be worth as much as some thought.

State Revenue Secretary Jim Terwilliger spoke about the situation Tuesday at a meeting with the South Dakota Council of Economic Advisors.

Terwilliger said his latest estimate was South Dakota’s state treasury will lose $20 million to $25 million when the internet-services tax is repealed.

South Dakota’s treasury meanwhile has started seeing some gains in revenue from the Wayfair decision.

Terwilliger said more remote sellers and third-party marketplaces remit sales and use taxes on goods and services sold over the internet into South Dakota.

Terwilliger said new revenues from remote sellers appear to be running roughly $1 million to $3 million month to month ahead of last year, depending on the month.

Thune, a Republican, was up front when the legislation to eliminate taxes on internet services was moving through Congress.

He issued a news release February 10, 2015, saying that he and U.S. Senator Ron Wyden, a Democrat from Oregon, were re-introducing the legislation.

Wyden was one of the original sponsors when it first passed in 1998 with a grandfather provision protecting the states that were charging sales taxes.

Thune put out another news release February 11, 2016, after the legislation made it through the U.S. Senate and was on the way to President Obama.

Michael Mazerov, a senior fellow at the national Center on Budget and Policy Priorities, wrote in a blog post December 11, 2015, that Congress should the Internet Tax Freedom Act expire.

“There’s no longer any justification for banning states and localities from imposing the same taxes on Internet access service that they impose on cable TV, telephone calls, physical books, and other ways to transmit entertainment and information,” Mazerov said. “But if lawmakers want to make ITFA permanent, they should do so in conjunction with legislation now before Congress empowering states to tax most online purchases by consumers, in order to offset the revenue loss.”

That legislation happened to be House Resolution 2775, whose co-sponsors included then-U.S. Representative Kristi Noem, a South Dakota Republican. She wasn’t able to get the legislation out of a House committee.

Two years later, Noem defeated then-state Attorney General Marty Jackley for the Republican nomination for governor in the June 5, 2018, primary election. Later that same month, the U.S. Supreme Court on June 21, 2018, issued the Wayfair decision, ruling 5-4 in favor of South Dakota and other states.

Jackley had argued the case to the justices. His statement that day was to the point: “Today’s landmark decision is a win for South Dakota and for Main Street businesses across America that will now have a level playing field and tax fairness.”