Merck (NYSE: MRK) has decided to continue its partnership with AstraZeneca (NYSE: AZN) for at least a few more years.

The breakup of the joint venture between Merck and AstraZeneca is complicated enough to make your head spin. Merck could have sold its rights to four approved drugs (and some in the clinic) for $650 million. Instead, it's opting to continue getting payments, which were $69 million last year, from the sales of those drugs until 2010, at which time AstraZeneca gets the option of buying the rights to the drugs for $650 million.

If that weren't complicated enough, there are additional drugs in the partnership that send payments to Merck and a loan payment that goes in the opposite direction to AstraZeneca. The net result will be a $2.6 billion payment to Merck this year.

But wait, there's even more clauses to muddle through. AstraZeneca has the option of purchasing the U.S. rights to heartburn drugs Prilosec and Nexium in 2012 or 2017 or if the drugs sales fall below a certain amount, but only if it exercises the 2010 clause to buy the drugs listed above.

The drugs falling below the minimum amount is certainly a possibility; sales of Nexium slipped 9% year over year in the most recent quarter and are under increasing pressure, since Teva Pharmaceuticals (Nasdaq: TEVA) launched a generic version of Wyeth's (NYSE: WYE) competing drug, Protonix.

For Merck, yesterday's move wasn't unexpected; the company had included the continuation of the annual payments in its 2008 guidance. Merck was expecting a 9% spike in revenue from its equity partnerships this year, but it's going to be hard pressed to get there, since the partnership selling cholesterol drugs with Schering-Plough (NYSE: SGP) will likely come up short of Merck's pre-Enhance forecast.

Looking for stock ideas of companies that pay dividends? Grab a 30-day free trial of the Income Investor newsletter and check out all of our past recommendations.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. The Fool has a disclosure policy.