Gilead Sciences (NASDAQ:GILD) had a rough second quarter. Revenue and earnings were both pretty close to analysts' estimates, but management admitted that hepatitis C revenues were in a long-term decline and doesn't yet know when they'll hit a minimum table. With its major growth engine sputtering, Gilead didn't have a lot of great news to share.

Aside from its HIV franchise. That segment rocked.

Image source: Getty Images.

Reigniting growth

HIV top-line numbers were impressive enough: Q2 global HIV sales grew to $3.1 billion, up 15% year over year. But the drivers behind it were even better.

Truvada revenue grew by an impressive 26.2% year over year in the United States. The primary reason: The drug is increasingly being used for pre-exposure prophylaxis, or PrEP, a CDC-recommended regimen designed to prevent the spread of HIV. Truvada is the drug in the regimen. Gilead's management estimates that between 60,000 and 70,000 U.S. patients use Truvada for PrEP -- roughly one-third of the drug's domestic prescription volume. The opportunity here for Gilead is substantial: Demand for Truvada for PrEP will probably keep building as educational campaigns designed to reduce HIV infection rates persuade more people to use the drug preventatively -- and stay on it for years to come.

Genvoya, the first of the new TAF-containing regimens designed to grow Gilead's market share, saw its sales double from Q1 to Q2 to $268 million, putting the drug at a blockbuster run rate with under a year in the market. (Now that's growth that, as an investor, I'm excited about.) Gilead COO Kevin Young noted that Genvoya's launch "represents the most successful HIV launch since the introduction of Atripla, the first single-tablet regimen, a decade ago." He continued: "After its first six months of availability, Genvoya is already the most prescribed regimen for both treatment-naive and switch patients." (The quote comes from S&P Market Intelligence).

Of course, the vast majority of those switch patients are switching from another Gilead drug.

But that's a good thing too.

Cannibalization is the goal

It seems weird, but Gilead's management noted approvingly that 90% of Genvoya switches came from Gilead therapies -- and that a similar percentage of switches to newer products Odefsey and Descovy also came from other Gilead drugs.

Viread, which is one of the primary building blocks in most of Gilead's older HIV cocktails, can have some nasty side effects with extended treatment, particularly bone loss in some patients. TAF, which replaces Viread to create Genvoya, Odefsey, and Descovy, has fewer side effects and is similarly efficacious.

To understand why Gilead wants cannibalization, you have to consider the dynamics of the HIV market: In many cases, HIV-infected patients will be on these drugs for decades. Minimizing side effects is key to retaining market share -- and, as Gilead Executive VP Paul Carter explained last quarter, because of the TAF regimens, "fewer patients who switch from Gilead TDF [Viread]-containing regimens move to non-Gilead products."

If Gilead can move these switchers to regimens containing TAF, it can continue treating them for potentially decades more. There's also the minor issue of patents: Most of the older Viread regimens see their U.S. patents expire within the next five years (Viread in 2018, Truvada in 2021, Complera/Eviplera in 2022). Patent expiry will open up these drugs to generic competition -- which probably will largely wipe out Gilead's profits on these drugs. But the TAF regimens, as newer drugs, have a wee bit longer before they'll be hit with generic competition. Genvoya, for example, has patent protection until 2030.

So if Gilead successfully switches patients to these similarly efficacious drugs, which also come with fewer side effects, it'll both keep these patients longer and retain its pricing power. Seems like a win-win.

And for those wondering, Gilead and the FDA are in discussions about what studies would be needed to replace Truvada as the treatment for PrEP with a TAF-based regimen. More to come in the coming quarters.

A long-term winner

Roughly 79% of HIV patients in the United States are on a Gilead HIV regimen. If you can believe it, that's down from past quarters. For example, in Q1 2015, Gilead had 81% market share. But with the TAF-based regimens providing Gilead with a solid defense -- and even some offense, as Genvoya got 10% of its switch patients from non-Gilead therapies -- this looks like a franchise set to throw off lots of profits for a long time hence.

With Gilead setting itself up for success in HIV treatment into the 2030s, the question is simple: What's next? And although I don't pretend to know the answer, I would speculate that we'll be seeing management put its fantastic talent for acquiring other businesses to work in the coming quarters.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.