Whatever was holding up a third HIV drug partnership between Gilead Sciences (Nasdaq: GILD) and Johnson & Johnson (NYSE: JNJ) seems to have been worked out.

Gilead and J&J set up a pact in June to develop a pill that combines Gilead's development-stage cobicistat and Johnson & Johnson's Prezista; that arrangement followed their first deal for the combo product Complera that's now on the market. The cobicistat-Prezista deal was predicated on the drugmakers' signing an agreement to develop a combo product containing Prezista and cobicistat along with Gilead's Emtriva and another development-stage drug, GS 7340.

Under the terms of the third deal, Gilead will be responsible for the worldwide development and commercialization of the four-drug pill, while J&J retains the right to market the drug alongside Gilead in certain undisclosed major markets.

The terms of the contract weren't disclosed, so it's hard to tell who got the better end of the deal. Since they're partners on multiple products, one would have to guess that neither company was trying to stick it to the other one. Gilead's terms for the Complera deal are better than it has with Bristol-Myers Squibb (NYSE: BMY) for their combo product Atripla, so I'd expect the terms for the four-drug combo to be at least that good.

Whatever the terms of the deal, both companies really need each other to move forward. GlaxoSmithKline (NYSE: GSK) and Pfizer (NYSE: PFE) have teamed up in a joint venture called ViiV Healthcare. The only way for other HIV drugmakers to compete with the multiple combo products that ViiV could develop given the plethora of drugs each donated to the joint venture.

Unless J&J is going to buy Gilead -- and while not a bad idea, I wouldn't count on it given J&J's propensity to buy companies smaller than Gilead -- a solid friendship with multiple pacts seems like a good move.

Follow all the HIV drugmakers as they hook up and develop combo products by adding them to My Watchlist, the Fool's free watchlist service. You can add all the companies or use the following links for individual companies:

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.