German pharmaceutical giant Bayer has reached an agreement to buy U.S. seed and weed killer company Monsanto for $66 billion after months of negotiations, the two businesses announced Wednesday. Bayer will pay Monsanto shareholders $128 a share in cash, the largest cash bid on record. Bayer initially offered $122 months ago when negotiations began. Although Monsanto has accepted the offer, its shareholders will still need to approve the buyout, and Bayer has promised $2 billion to the biotechnology company should Bayer fail to get the necessary regulatory clearance. Bayer expects the deal to close by the end of 2017. Shareholders have been critical of the plan, saying Bayer will overpay and lose focus from the pharmaceutical business as it moves toward becoming an agribusiness giant. Bayer makes a wide range of weed killers and pesticides in addition to pharmaceuticals. The deal with Monsanto, known for its seed business and the weed killer glyphosate, would mean Bayer commands over a quarter of the combined world market for seeds and pesticides.