SEATTLE — Amazon and the tax man are back at it again.

For years, the company and state governments scuffled over Amazon’s resistance to charging state sales tax, which helped keep prices low on its e-commerce site and angered politicians and other retailers. Eventually, Amazon began adding the tax in states across the country.

But there was a loophole. Amazon added the tax only when the item came from its own inventory, not from the millions of independent merchants who sell products through Amazon’s website. Amazon left it up to those sellers — who account for half of all items sold on the site — to collect sales tax on their own. But, according to sellers, tax lawyers and accountants who work with them, most do not.

Now states, thirsty for the millions of dollars in unpaid sales taxes revenue, are coming for their money.

Amazon recently warned its sellers that the company, as of Jan. 1, would be collecting sales tax from merchants who ship orders to its home state, Washington, as it seeks to comply with a state law signed in July. That will be the first time Amazon has collected a state sales tax for the merchants known as marketplace sellers on its site.