Lloyd's of London insurer Catlin Group Ltd. has agreed to a takeover offer worth more than £2.5 billion ($3.8 billion) from XL Group plc (XL) , the New York-listed, Dublin-based buyer said on Friday.

The transaction will be the largest ever takeover of a Lloyd's of London insurer and end Catlin's three-decade run as an independent company. XL has agreed to pay 388 pence in cash and 0.13 of a share for each Catlin share, which translates into a price of 693 pence per share based on the buyer's Thursday closing price, XL said.

The terms mark a slight reduction to the 410 pence in cash and 0.13 of an XL share that Catlin on Dec. 17 said was under consideration, though Catlin shareholders will also receive a final dividend of 22 pence per share. XL put the equity value of the takeover at just under $4.1 billion excluding that dividend. Catlin had about 362.57 million shares out as of Jan. 8.

Catlin shares were up 34.5 pence, or 5.5%, by early afternoon in London at 695 pence. XL shares in New York were up 57 cents, or 1.6%, to $35.42.

XL noted that the price is a 23.5% premium to Catlin's undisturbed share price as of Dec. 16. It said that the merged entity will have $17 billion of total capital and about $10 billion of net premiums, based on 2013 results, when XL raked in net premiums of $6.3 billion, and Catlin about $4 billion.

In London, the deal will extend Catlin's leadership of the Lloyd's of London specialty insurance market based on the merged entity's gross written premiums of $3.8 billion, which make it half as large again as nearest rival QBE Ltd. The combination "will add immediate scale in specialty insurance, it will create a more efficient and more capable global network by bringing our two infrastructures together, and it creates a top 10 reinsurer with expanded alternative capital capabilities," XL chief executive Mike McGavick in a statement.

McGavick will continue as CEO, while Catlin CEO and founder Stephen Catlin will become deputy chairman.

XL predicted that the deal will generate double-digit earnings per share growth in 2017 and at least $200 million in cost synergies by the end of that year, mainly by cutting out duplicate IT, real estate and operating costs. XL put one-time integration costs at $250 million.

XL said it expects to issue about $1.8 billion of new shares in connection with the takeover, and has put in place a 364-day bridge facility for up to £1.6 billion to reassure Catlin investors that it's got the cash to fund the deal.

The transaction is structured as a scheme of arrangement and is expected to close midyear. It must gain the approval of 75% of Catlin stock voted at a special meeting, and a majority of shareholders by number, as well as the sanction of the Supreme Court of Bermuda.

The target is listed in London but incorporated in Bermuda and as such the transaction doesn't fall under the auspices of Britain's Takeover Panel. The two sides were reported to have reached a deal late last year but no announcement was made.

Morgan Stanley's Ian Hart, Erico Bischoff, Gavin McFarland and Meir Lewis and Goldman, Sachs & Co.'s Andrea Vittorelli, Nimesh Khiroya and Jason Eisenstadt are financial advisers to XL.

A Skadden, Arps, Slate, Meagher & Flom LLP team including Todd Freed, Scott Hopkins, Robert Stirling, Laura Knoll and Hamed Afzal is providing legal advice to XL.

JPMorgan Chase & Co.'s Conor Hillery, Robert Thomson and Mike Collar; Evercore Group LLC's Andrew Sibbald, Stuart Britton and Neil Bhadra; and Barclays plc's Jim Renwick, Kunal Gandhi, Michael Lamb and Stuart Ord are advisers to Catlin, whose law firm is Slaughter and May.

Debevoise & Plimpton LLP's Nicholas F. Potter, Alexander R. Cochran, Ethan T. James and Vadim Mahmoudov are U.S. counsel to Catlin.

— David Marcus contributed to this report.