Inc. (AMZN) could be on the hook for $500 million in taxes in South Carolina if it doesn’t start charging third-party merchants sales tax.

That’s according to the South Carolina’s Department of Revenue, which made the claim in a court motion this week, saying the state could lose that much money over the course of five years. As it stands, South Carolina contends that the Seattle e-commerce giant owes it $57 million in uncollected sales tax from last year. The loss over the five years coincides with how long the state says the case could drag out in court. In the meantime, South Carolina wants Amazon to start collecting sales tax from its third-party sellers and set it aside in a trust until the lawsuit is over. "Ordering Amazon to collect the tax due and remit it to a trust simply ensures that the state will receive what it is owed at the end of the litigation," the motion stated, according to CNBC. (See also: Amazon a Factor in Low US Inflation: Goldman Sachs.)

Whose Responsibility?

South Carolina first filed its lawsuit against Amazon this summer, claiming it is losing money because the company doesn’t collect taxes from third-party sellers, only getting sales tax on the products its hawks on its own e-commerce platform. South Carolina argues the online retailer has to collect sales tax on products sold by merchants in the state the purchase is made. Amazon has long argued that it is the responsibility of the sellers, but South Carolina sees it differently. It thinks the company should be in charge of collecting and remitting the sales tax to the state. They point to the fact that the third-party sellers have an advantage over other retailers because they aren’t paying sales tax. South Carolina said in the motion that the advantage could result in tax-compliant businesses shutting down in the state. If South Carolina is successful in its legal fight with Amazon, it could prompt other states to follow through. When reporting third-quarter earnings in late October, the company said that while they are fighting the tax claims, it could be subjected to “significant additional tax liabilities.” (See also: After Apple, EU Takes Aim At Amazon.)

South Carolina isn’t alone in going after the e-commerce giant over claims that tax revenue is owed to them. In October, the European Union ordered it to pay $294 million in back taxes. The e-commerce giant has to pay the amount to Luxembourg, which gave the company illegal benefits that resulted in almost three quarters of its profit not being taxed, said EU Commissioner for Competition Margrethe Vestager in a statement.