People walk by a Dollar Tree store on December 11, 2018 in the Brooklyn borough of New York City.

Dollar Tree stocked over-the-counter drugs produced by Chinese companies with "a pattern of serious violations" of federal law on good manufacturing practices, the Food and Drug Administration said in a warning letter sent to the company Thursday.

The FDA analyzed import data and found Dollar Tree bought and received products from foreign companies that had received warning letters and had been placed on import alert for manufacturing issues. The agency also alleges that Greenbrier, operating as Dollar Tree, has used contract manufacturers and suppliers with "significant" violations for its private-label Assured Brand drugs.

"In this case, Dollar Tree has the ultimate responsibility to ensure that it does not sell potentially unsafe drugs and other FDA-regulated products to Americans," Donald Ashley, compliance director in the FDA's Center for Drug Evaluation and Research, said in a statement.

The FDA said it inspected Greenbrier's headquarters in January and its distribution warehouse after uncovering violations at multiple foreign drug companies that supplied the U.S. retailer, according to the warning letter.