Irvine-based Allergan Inc. has agreed to be acquired for $66 billion by Actavis PLC.

Allergan shares are up 7% during morning trading on news of the deal, to a market capitalization of about $63.6 billion.

Shares of Parsippany, N.J.-based Actavis are up nearly 4%, at a market capitalization of about $64.6 billion.

Actavis said it’s paying $129.22 in cash and about 0.37 Actavis shares for each Allergan share, which combine to $219 a share.

The combined company, which is expected to have revenue of about $23 billion in 2015, will be headed by Actavis Chief Executive Brent Saunders, and Actavis Executive Chairman Paul Bisaro will continue in his role, according to a statement by the companies.

The statement did not make clear whether Allergan Chief Executive David Pyott will stay on board. It said that senior management teams of both companies will lead the integration process, and that two members of the Allergan board of directors “will be invited to join the Actavis board” after the transaction is complete.

The deal “provides Allergan stockholders with substantial and immediate value, as well as the opportunity to participate in the significant upside potential of the combined company,” Pyott said. “Together with Actavis, we are poised to extend the Allergan growth story as part of a larger organization with a broad and balanced portfolio, a meaningful commitment to research and development, a strong pipeline and an unwavering focus on exceeding the expectations of patients and the medical specialists who treat them.”

The acquisition, which was unanimously approved by the boards of both companies, is likely to end the months-long pursuit of Allergan by hostile suitors Valeant Pharmaceuticals International Inc. and activist investor Bill Ackman’s Pershing Square Capital Management LP.

Valeant’s latest formal bid for Allergan was valued at about $55 billion, or about $185 per share.

Valeant Chief Executive Michael Pearson said that “while we will review any such agreement in determining our course of action, Valeant cannot justify to its own shareholders paying a price of $219 or more per share for Allergan.”

Valeant shares are up about 0.7% in morning trading, to a market capitalization of about $45.3 billion.