Walgreens has decided to ban tobacco sales to minors several weeks after a federal official called the drugstore chain a top violator of laws restricting access to cigarettes, smokeless tobacco and other products.

The drugstore chain said Tuesday that it will require customers to be at least 21 years old to purchase tobacco in any of its more than 9,500 stores nationwide. The policy starts Sept. 1.

Former Food and Drug Administration chief Scott Gottlieb said in March that inspectors had found more than 1,800 instances since 2010 in which one of the company’s stores violated the law.

U.S. Senate Majority Leader Mitch McConnell plans to introduce legislation that raises the minimum age to buy from 18 to 21 nationally.

Walgreens rival CVS Health quit selling tobacco several years ago.