Merger agreed after months of negotiation