A team of Ropes & Gray attorneys helped shape a pair of drug company acquisitions for Cubist Pharmaceuticals in separate deals worth up to $1.62 billion combined.

The deals—both of which are expected to close later this year, pending regulatory approvals—give Cubist two drugs that Bloomberg reports are expected to eventually generate sales between $600 million and $1 billion a year.

In one of two announcements released late Tuesday, Lexington, Massachusetts–based Cubist said it will pay $707 million in upfront cash to acquire San Diego–based Trius Therapeutics, which makes antibiotics used to treat serious infections. (Trius is currently in late-stage trials with a drug, tedizolid phosphate, specifically designed to treat MRSA bacterial infections.) The terms of the deal for Trius include a contingent value right (CVR) that could bring the total price of that transaction as high as $818 million, should certain sales milestones be reached. Cubist is initially paying $13.50 for each Trius share, representing a premium of roughly 15 percent over the target's Tuesday closing price.

In a second announcement, Cubist said it has also agreed to pay $535 million in up-front cash for Jersey City, New Jersey–based Optimer Pharmaceuticals, which received Food and Drug Administration approval in 2011 for antibacterial drug Dificid. The product is the first approved drug in more than 25 years to treat a specific type of infection, typically found in hospital patients, that causes diarrhea. (Since 2011, Cubist and Optimer have had agreements in place to copromote Dificid in the United States, with Cubist receiving regular service fees for its efforts.) The terms of the deal for Optimer also call for a CVR, which could see the buyer pay an additional amount of up to $266 million should Dificid hit certain sales targets in the U.S. and Canada. Cubist's initial payment for Optimer values the target at $10.75 per share, a premium of almost 24 percent over Optimer's Tuesday closing price.

Ropes is advising Cubist on the deals with a team led by Boston-based securities and public companies partners Paul Kinsella and Christopher Comeau. The firm has represented Cubist on a number of past corporate and securities matters, including the company's 2011 purchase of prescription pain drug company Adolor Corporation for $215 million.

Cubist's chief legal officer is Thomas DesRosier.

Trius, meanwhile, has turned to a legal team that includes San Diego–based Cooley M&A head Barbara Borden to advise on its sale. Other Cooley attorneys on the deal include M&A partner Charles Blair, compensation and benefits partner Thomas Welk, antitrust partner Jacqueline Grise, and M&A special counsel Rama Padmanabhan. The Cooley associates working on the deal are Wade Andrews, Holly Attiq, Daniel Gutierrez, Kevin Henderson, Justin Ho, and Matt Robbins. Trius's general counsel is Matthew Onaitis.

Cooley advised Trius in 2010 on its initial public offering, which raised $50 million.

For its part, Optimer brought in a Sullivan & Cromwell team led by corporate partners Francis Aquila and George Sampas in New York, and Rita O'Neill in Los Angeles. Tax partner Ronald Creamer Jr. and executive compensation and benefits partner Marc Trevino are also advising on the deal, along with associates Scott Crofton, Lee Silver, and Ashish Thaker.

The firm has been advising Optimer since February, when the company announced that it was exploring a sale after former CEO Pedro Lichtinger, stepped down amid compliance issues.

Meredith Schaum is Optimer's general counsel.