In December 2012, Christopher Cox, cochair of the corporate group at Cadwalader, Wickersham & Taft, was retained by Irish drugmaker Élan Corporation PLC to advise on the sale of its stake in Tysabri, a multiple sclerosis drug. It should have been a quick and relatively straightforward engagement: Cox, who is based in New York, had represented the company on eight transactions of more than $1 billion in the past seven years alone. But it would be a full 12 months before Cox finally finished the transaction, and not before dealing with a hostile takeover bid and the eventual sale of Élan itself. “This was by a stretch the longest transaction that I’ve ever worked on,” Cox says. “It was a long, difficult process.”

Everything started off well. Early negotiations with Élan’s joint venture partner on Tysabri, American biotech company Biogen Idec Inc., proved fruitful, and by February 2013 the principals struck a deal in which Biogen would pay $3.25 billion in cash for the drug—a humanized monoclonal antibody that works to slow down the progression of the physical disability caused by multiple sclerosis. Élan also secured a lucrative tiered royalty of up to 25 percent of future worldwide net sales of Tysabri, which in 2012 hit $1.6 billion.

Then all hell broke loose. Within a fortnight, New York–based biopharmaceutical investor Royalty Pharma launched an unsolicited takeover bid for Élan. The $11 per share all-cash offer, which valued the company at $6.6 billion, was rejected by the Élan board. A second, higher offer, which former Élan chief executive officer Kelly Martin says still “grossly undervalued” the company, was also declined.

Having closed its deal with Biogen for Tysabri, Élan pressed ahead with its own strategy and announced a series of four transactions: a $200 million share repurchase program; the acquisition of AOP Orphan Pharmaceuticals, an Austrian company focused on finding cures for rare diseases; the divestiture of its neuropsychiatric drug candidate, ELND005; and a $1 billion acquisition of royalties on new respiratory medicines from San Francisco–based biopharmaceutical company Theravance Inc.

But Royalty, represented by Akin Gump Strauss Hauer & Feld, was far from finished. It came back with a third offer for Élan, this time with an added stipulation that shareholders block the four transactions that Élan had lined up. (Because Élan was still in an “offer period” under the Irish Takeover Rules as a result of Royalty’s initial takeover bid, it needed to obtain shareholder approval for any new transaction.)

Three of the deals were voted down—only the share buyback was approved—and Élan’s board started coming under increasing pressure from investors to accept Royalty’s offer. “We had investors jumping up and down saying we should do a deal—the pressure was unbelievable,” says Martin, who spent 22 years at Merrill Lynch & Co. Inc. before joining Élan in 2003. Investors pushed back “because they said we weren’t ‘pharma people,’ whatever that means,” Martin continues. “But we felt that our investors were totally missing the plot.”

Cox’s job in helping Élan resist the Royalty takeover bid was complicated by the fact that common U.S. takeover defense tactics are not permissible under Irish law. So, for instance, he couldn’t rely on a poison pill—a frequently used shareholder rights plan that attempts to discourage an unwanted takeover by making the company’s stock less attractive, often by allowing existing stockholders to buy more shares at a discount.

“Defending Élan without even the most basic defensive measures was like playing chess,” Cox says. “It required a lot of creativity and trying to think five, six, seven steps ahead in a constantly changing situation.”

Three months later, in April, Élan sealed its $8.6 billion sale to U.S. generic pharmaceutical firm Perrigo Company plc, which incorporated itself in Ireland as part of the deal via a so-called inversion transaction. Perrigo paid Élan $16.50 per share—27 percent more than Royalty’s highest offer for the company, of $13.00 per share.

“I didn’t get a lot of thank-you letters from those genius investors,” laughs Martin, “but that’s fine.”