The drugstore chain Walgreens will stop selling tobacco products to customers under 21, the company announced on Tuesday.

The decision came weeks after the Food and Drug Administration accused the company of repeatedly selling tobacco products to minors — and amid similar moves by competitors and lawmakers around the country to curb teenage vaping.

About a dozen states and hundreds of American cities have already raised the minimum age to buy tobacco to 21. Last week, Senator Mitch McConnell, the Republican majority leader, said he would introduce a bill in May to raise the minimum age nationwide.

Rite Aid announced this month that it would stop selling all e-cigarettes and vaping products, citing concern over tobacco use among minors. (It will continue to sell regular tobacco products in areas where it is legal.) CVS stopped selling tobacco products in 2014.