Vertex Pharmaceuticals (VRTX -0.76%) is the global leader in cystic fibrosis (CF) treatment. The company is known for its combination therapies targeting a defective protein that causes the disease's devastating symptoms.

But one possible threat to market share waited in the wings. AbbVie (ABBV -0.30%) had shepherded its own combination-therapy candidate -- also targeting the defective protein -- into phase 2 studies.

Just recently, though, AbbVie ended development of the potential treatment and dropped its CF program. That means Vertex lost a potential rival, and one with significant resources. AbbVie is forecast to become the No. 1 pharmaceutical company by prescription-drug market share later this decade, according to Evaluate. Does this big player's CF exit make Vertex a buy? Let's find out.

Dominance and growth

First, let's talk about Vertex's dominance and potential growth in CF. Right now, the company sells four CF drugs. Its biggest one is the newest: Trikafta, approved in 2019.

Like Vertex's other CF drugs, it improves the function of the cystic fibrosis transmembrane conductance regulator (CFTR) protein. These types of drugs are game changers for those suffering from the disease. As a result, doctors and patients have flocked to them -- and they have brought in billions of dollars for Vertex.

Trikafta addresses the most common CF genetic mutation, so it's able to treat 90% of patients. And there's hope for the other 10%. These are patients who don't produce any CFTR protein. Vertex is working on a potential therapy for them with Moderna, and the partners recently launched clinical trials. This represents possible growth for Vertex down the road.

Also, Trikafta's growth is far from over. The treatment recently won U.S. regulatory approval for use in children ages 2 through 5. This means Trikafta could reach an additional 900 patients.

The therapy's revenue also could grow as more countries approve reimbursements. More than 20,000 CF patients in North America, Europe, Australia, and New Zealand are candidates for Vertex's medicines but aren't yet being treated with them.

So, Vertex has plenty of growth on the horizon thanks to the CF portfolio. And the company's CF program probably won't depend on just Trikafta. Vertex is testing a next-in-class triple combination therapy in phase 3 trials against its top drug. And this candidate might win.

It already is more convenient, with one dose per day rather than Trikafta's two. Vertex aims to complete the trial of this potential new product this year.

In 2021, Vertex predicted it would dominate CF treatment until at least the late 2030s. Considering Trikafta's growth and the possibility of an even better product just ahead, there's reason to be confident.

The AbbVie decision

Now, let's get back to the AbbVie decision. The big pharma company decided its candidate's trial results weren't compelling enough to merit more research. This treatment represented AbbVie's entire CF program, so it's not surprising the company decided to completely exit CF.

If AbbVie's candidate eventually demonstrated superiority to Trikafta, and if the company could have offered such a therapy at a lower price, then it might have hurt Vertex's market share. So AbbVie's exit is good news for Vertex.

Still, I don't think AbbVie represented an enormous threat. Vertex has developed expertise in CF and has advanced to such a point that it will be difficult for another company to leap ahead.

Considering all of this, should you buy Vertex shares? I would have bought its shares even if AbbVie had continued its program. Vertex has an extremely solid leadership position in CF. In its first-quarter earnings report this week, Vertex reiterated its forecast for full-year product revenue of at least $9.55 billion.

The company also has more than $11 billion in cash, and free cash flow is on the rise. This means Vertex has what it takes to support its programs and invest externally for growth.

VRTX Free Cash Flow Chart

VRTX free cash flow data by YCharts.

Vertex trades for 23 times forward earnings estimates, which might look expensive compared to certain pharmaceutical names. For example, AbbVie trades for 14. But Vertex's position in the billion-dollar CF market and its pipeline of exciting programs make it worth the price. And that's why it's a top stock to buy now.