CVS, one of the nation’s largest drugstore chains, said Wednesday that it will stop selling cigarettes at its 7,600 locations in an expensive but calculated bid to boost its image as a full-fledged health-care provider rather than a simple purveyor of greeting cards and shampoo.

Executives said the move will cost the company $2 billion a year in lost sales. But they are gambling that abandoning smokers will help them strike more profitable deals with hospitals and health insurers — and appeal to growing ranks of customers newly insured under the Affordable Care Act.

Industry analysts and public health advocates called it a watershed decision that could pressure other major pharmacies to follow suit. With health care on track to make up a fifth of the U.S. economy by 2022, CVS, Rite Aid, Walgreens — even Wal-Mart, Target and Kroger — have been rushing to open in-store clinics that administer flu shots and provide other services more traditionally offered in a doctor’s office.

“Health care is becoming more decentralized, and consumers are getting more choices about where to get care, whether that’s a retail clinic or a traditional hospital,” said Vaughn Kauffman, a principal in PriceWaterhouseCooper’s Health Industries practice. “As we’re out there talking to companies that are in retail, they see big opportunity here and are looking for ways to give consumers more convenient options.”

To date, these sanitized settings have existed side by side with cigarettes and other tobacco products, the leading cause of preventable death in the United States. By Oct. 1, CVS aims to be the first to break that link.

“By removing tobacco products from our retail shelves, we will better serve our patients, clients and health-care providers while positioning CVS Caremark for future growth as a health-care company,” Larry Merlo, president and chief executive of CVS, said in a video statement. “Cigarettes and tobacco products have no place in a setting where health care is delivered. This is the right thing to do.”

President Obama — a former smoker — praised the chain’s decision in a statement Wednesday, saying the change “sets a powerful example” that will “help advance my administration’s efforts to reduce tobacco-related deaths, cancer, and heart disease, as well as bring down health care costs — ultimately saving lives and protecting untold numbers of families from pain and heartbreak for years to come.”

Walgreens spokesman Jim Cohn said his company is also “evaluating this product category” and “will continue to evaluate the choice of products our customers want, while also helping to educate them and providing smoking cessation products and alternatives that help to reduce the demand for tobacco products.”

Analysts have seen the use of retail clinics, which tend to offer basic medical services at a lower price, grow quickly during the recession. And they expect that trend to continue as millions of Americans gain coverage under the Affordable Care Act.

With 750 MinuteClinics, CVS has the country’s largest chain of pharmacy-based health clinics. The clinics have allowed the company to pursue contracts with hospitals and health plans, often to provide primary care services weekends and evenings, when doctors’ offices tend to be closed.

CVS Chief Medical Officer Troyen A. Brennan estimates that the company has 30 to 40 partnerships with health-care systems across the country and is in talks with a similar number about starting arrangements.

Banning cigarettes could make the clinics even more attractive as the new health-care law takes full effect. The law provides an array of incentives to encourage doctors, hospitals and pharmacists to help patients become healthier. CVS could now strike deals with more traditional health-care providers that might involve a financial bonus if the pharmacy helps reduce smoking rates among patients.

“Increasingly, our contracts have a particular parameter regarding performance,” Brennan said. “Our clients are looking for us to be able to improve drug adherence and getting results. We’re closely following that.”

Along with ending tobacco sales, CVS will roll out an anti-smoking campaign with in-store and online components. The company provided no details but said the program will start in the spring.

CVS expects that halting tobacco sales will reduce earnings by 6 to 9 cents per share. But the company said in a statement that it has “identified incremental opportunities that are expected to offset the profitability impact.” In an interview, CVS/pharmacy President Helena Foulkes declined to prove additional details on those opportunities.

“I would say that we have made a decision that this is the right thing to do for our business,” Foulkes said. “We have plans in place to be able to deliver the numbers that we promised [to investors] this year.”

Whatever the business consequences, anti-smoking advocates were heartened by the decision.

“CVS taking this step is a giant leap forward. From a purely commercial standpoint, it doesn’t make any sense,” said Robin Koval, president of the Legacy Foundation, a nonprofit group that focuses on ending smoking. “It’s a conversation that’s been going on for quite some time between public health groups and retailers, but progress has been very slow.”

A recent report from the U.S. Surgeon General estimates that the nation spends $132 billion a year treating smoking-related diseases. Since the Surgeon General’s Office’s first report warning of tobacco’s risks 50 years ago, the number of smokers has dropped sharply to 18 percent of American adults from 42 percent in 1964.

But although smoking rates have been cut in half, “we still have 43 million Americans smoking daily,” said John Seffrin, the American Cancer Society’s chief executive.

“We’ve got to help them get off of cigarettes if we’re not going to accept the carnage of this illness,” Seffrin said. “The CVS decision is one important piece in solving the 21st century problem of tobacco use.”