Dublin-based generic drug maker Actavis said Tuesday it will buy Forest Laboratories in a $25 billion cash-and-stock deal that increases Actavis’ access to specialty pharmaceutical products.

Actavis has agreed to $26.04 in cash and 0.3306 Actavis shares for each Forest share—valuing the target at $89.48 per share, which represents a 31 percent premium over Forest’s Friday closing price. Forest shareholders will own roughly 35 percent of the combined company once the deal closes, which is expected to occur sometime in mid-2014, pending the approval of regulators as well as both companies’ shareholders.

New York–based Forest makes specialty drugs used to treat a range of conditions that affect the central nervous system, as well as cardiovascular, gastrointestinal and respiratory diseases. The company also makes well-known antidepressant Lexapro and Alzheimer’s treatment Namenda. Actavis focuses primarily on producing and distributing generic drugs, but the company also currently generates roughly 30 percent of its revenues from North American specialty drug sales. Actavis said Tuesday that the combined company can be expected to generate annual revenues of roughly $15 billion, with specialty drug sales representing roughly 50 percent of that total.

Actavis also expects the deal to produce roughly $1 billion in annual savings three years after the deal closes, including about $100 million in tax savings. The New York Times notes that the tax savings mostly result from the fact that Forest’s earnings will be subject to Ireland’s lower tax rates once it is owned by Actavis, which moved its headquarters to that country only last year with its $8.5 billion acquisition of generic rival Warner Chilcott. That deal allowed Actavis—then based in Parsippany, N.J.—to reincorporate itself in Ireland in a process called corporate inversion that enables companies to take advantage of lower tax rates overseas.

For Forest, the sale to Actavis comes a month after the U.S. company expanded its own specialty drug offerings with an agreement to buy gastrointestinal and cystic fibrosis drug treatment company Aptalis for $2.9 billion.

For legal counsel on its purchase of Forest, Actavis has turned to its longtime advisers at Latham & Watkins. The firm previously advised Actavis on last year’s purchase of Warner Chilcott. That deal came a year after Latham represented Watson Pharmaceuticals on its $5.6 billion acquisition of Switzerland-based Actavis Group—a transaction that resulted in Watson adopting the Actavis name.

Latham’s corporate team on the Forest deal is led by Orange County partners Scott Shean and Charles Ruck, along with New York partner Stephen Amdur. Capital markets partner Wesley Holmes, finance partner Daniel Seale, benefits and compensation partner James Barrall and tax partners Laurence Stein and Nicholas DeNovio are also advising on the deal, along with Latham associate Jesse Sheff.

Actavis’ chief legal officer is David Buchen.

Skadden, Arps, Slate, Meagher & Flom antitrust partners Steven Sunshine and Ingrid Vandenborre are advising Actavis on antitrust aspects of the deal, along with associate Maria Raptis. Skadden also served as antitrust counsel to Watson on its 2012 purchase of Actavis Group.

Forest has turned to Wachtell, Lipton, Rosen & Katz for legal advice on its sale to Actavis. Corporate partners Andrew Brownstein and Igor Kirman are leading a Wachtell team that also includes executive compensation and benefits partner Jeremy Goldstein as well as restructuring and finance partners Eric Rosof and Gregory Pessin. Partners Jodi Schwartz and T. Eiko Stange are advising on tax matters. Wachtell associates Neil Chatani, Tijana Dvornic, Victor Goldfeld, Jeffrey Lee, Rohit Nafday, Francis Stapleton IV and Elina Tetelbaum are also on the deal, along with law clerks Robert Borek and Jeffrey Crough.

The deal represents a change of pace from Wachtell’s previous work for Forest, which has included advising the company on a series of proxy fights with activist investor Carl Icahn, who holds an 11 percent stake in Forest.

Interestingly, Forbes notes that Icahn is one of the big winners when it comes to the sale of Forest. He had already seen the company’s shares nearly double in value over the past year, and he now stands to make even more of a profit based on the premium being offered by Actavis. (Forest’s share price also received a boost of roughly 18 percent last month as a result of the Aptalis deal.)

Other firms to land roles on the Actavis-Forest deal include Fried, Frank, Harris, Shriver & Jacobson and Simpson Thacher & Bartlett. Fried Frank corporate partners Abigail Bomba and Philip Richter are representing Greenhill & Co. in its role as financial adviser to Actavis. Simpson Thacher corporate partner Caroline Gottschalk is leading a team from that firm—which also includes corporate partner Robert Spatt and associate Michael Holick—representing J.P. Morgan in its role as Forest’s financial adviser.