New York (CNN Business) Walmart said Friday it will stop selling e-cigarettes as the number of deaths tied to vaping grows and public officials crack down on the industry.

The decision by America's largest retailer may influence other stores and marks another setback for the vaping industry. Walmart said it's exiting the business because of regulatory flux. CBS, Viacom and CNN parent company WarnerMedia also announced this week they would prohibit e-cigarette advertisements on their networks.

"Given the growing federal, state and local regulatory complexity and uncertainty regarding e-cigarettes, we plan to discontinue the sale of electronic nicotine delivery products at all Walmart and Sam's Club US locations," the company said in a statement. "We will complete our exit after selling through current inventory."

For Walmart, the move is another illustration of the company's willingness to wade into controversial issues. Earlier this month, Walmart announced it would stop selling handgun ammunition and ammunition commonly used in military-style assault weapons, as well as discourage customers from openly carrying guns at stores.

Halting the sale of e-cigarettes is also Walmart's latest major decision in restricting the availability of tobacco.

Read More