"Keep your friends close but your enemies closer," as the old saying goes. Is Merck (NYSE:MRK) taking that advice to heart? The drugmaker announced yesterday that it will team up with generic-pharmaceutical specialist Ranbaxy Laboratories -- the same company that had been trying to take down AstraZeneca's (NYSE:AZN) patent on heartburn medication Nexium, with which Merck is still involved.

Ranbaxy is getting an undisclosed up-front payment, and it could receive more than $100 million for each antimicrobial compound brought through phase 2a clinical development. At that point, Merck would take over development, and Ranbaxy would get royalties on sales of any approved drugs coming from the collaboration.

The Indian drugmaker has proved to be a formidable foe in the development of knockoff drugs, and big pharma is starting to take notice. Last year, Ranbaxy modified and expanded a partnership with GlaxoSmithKline (NYSE:GSK) to identify and develop potential drugs for a handful of diseases.

Don't expect Ranbaxy to stop here, though. CEO Malvinder Mohan Singh stated in a press release, "We believe that our philosophy of partnering with Big Pharma will continue to gather momentum as companies continue to recognize the strength and breadth of our R&D expertise and resources."

Merck agrees. "Collaborations with external partners, wherever in the world, are an integral and essential part of Merck's long-term strategy to build and expand its pipeline," said Mervyn Turner, senior vice president.

A collaboration like this is good news for contract research organizations such as Pharmaceutical Product Development (NASDAQ:PPDI) and WuXi PharmaTech (NYSE:WX). Furthermore, Turner's words make me think the Merck partnership isn't about keeping enemies close as much as it is just an outsourcing of research to a company that Merck believes can do a good job.

It's clear that the big pharma players are willing to team up with any company that they believe can develop compounds to replenish their ailing pipelines -- and the cheaper, the better.

More on Big Pharma's new cheapskate mentality: