NEW YORK — (AP) - Walmart bans cigarette sales to anyone under 21 years of age starting in July.

Walmart said Wednesday that it will raise the minimum age for tobacco products and e-cigarettes to 21 in an effort to combat tobacco sales to minors.

RELATED: Legislator wants to raise tobacco purchasing age to 21 in Arkansas

The world's largest retailer says the new rules will take effect in July, and will also include its Sam's Club warehouse stores.

Previously, its minimum purchase age was 18, aside from a number of states where the law required a minimum purchase age of 21.

Last month, drugstore operator Walgreens also said it would increase the minimum age for tobacco sales to 21.

RELATED: Rite Aid, Walgreens raise minimum age to 21 for tobacco sales