Amazon sued the N.C. Department of Revenue in 2010 to block efforts to obtain names and addresses of North Carolina residents who bought items from the company. A federal judge ruled against the state, which eventually settled with Amazon.

The company has not said why it has now changed course.

Customers are required to pay taxes for online purchases, but the requirement is rarely enforced by out-of-state retailers. The move will make North Carolina the 20th state in which the online retailer collects sales tax.

In 2012, the state estimated North Carolina lost as much as $214 million annually in uncollected online sales taxes.