RALEIGH—Starting Saturday, Amazon will begin charging sales tax for customers in North Carolina.

The online retailer had fought the tax for years, but recently changed course. The state estimates it loses $214 million a year in uncollected sales tax from online retailers.

North Carolina will become the 20th state in which Amazon collects sales tax.