Bayer AG agreed to buy Monsanto Co. (NYSE: MON)  in a deal valued at $66 billion, winding up four months of talks to create the world’s biggest supplier of seeds and pesticides.

Bayer will pay $128 a share in cash, the company said in a statement. The bid, the biggest deal in 2016 and largest foreign takeover ever by a German company, is 21 percent above Monsanto’s closing price on Sept. 13 in New York. Bayer also agreed to pay Monsanto a break-up fee of $2 billion if the deal is rejected on antitrust grounds.

The transaction caps a dramatic reshaping of the crop and seed industry. A year ago, the sector had at least a half-dozen global players. After Bayer and Monsanto tie up, creating a leader with $26 billion in combined revenue from agriculture, that number will shrink to just four.

Falling crop prices and a quest for greater efficiency have triggered a cascade of deals over the past year. Last December DuPont Co. and Dow Chemical Co. agreed to merge and then carve out a new crop-science unit. And in February, China National Chemical Corp. agreed to acquire Switzerland’s Syngenta AG, which Monsanto had pursued for years.

The deal values Monsanto at almost 21 times earnings before interest, taxes, depreciation and amortization, according to data compiled by Bloomberg. That compares to a median of about 9.4 times for comparable deals.

Bayer will fund the transaction with a combination of debt and equity. The equity component of about $19 billion will be raised through an issuance of mandatory convertible bonds as well as a rights offer. In the meantime, Bank of America Corp., Credit Suisse Group AG, Goldman Sachs Group Inc. (NYSE: GS), HSBC Holdings Plc and JPMorgan Chase & Co. (NYSE: JPM) agreed to provide bridge financing of $57 billion.  Bank of America, Credit Suisse and Rothschild & Co. advised Bayer on the transaction, while Morgan Stanley and Ducera Partners LLC acted for Monsanto.

Taking advantage of a decline in Monsanto’s share price, Bayer, based in the industrial city of Leverkusen, first made an unsolicited offer of $122 a share in May, and then in July bumped that to $125. Both proposals were rejected by Monsanto, but the company granted access to some financial accounts to conduct due diligence. Bayer made a third offer of $127.50, setting off the next round of negotiations that led to the agreement.

The transaction, which values shares of Monsanto at about $56 billion, will add to core earnings per share in the first full year after the deal closes, likely at the end of 2017, Bayer said. The combined seeds business will remain headquartered in St. Louis.

Buying Monsanto will allow Bayer to tap growing demand as farmers seek to boost productivity to feed an estimated 10 billion people globally by 2050. The deal gives Bayer more than 2,000 varieties of seeds for crops such as corn, soybeans, and wheat. Adding that portfolio to its own vegetable, rice, cotton, and oilseed offerings give Bayer a virtually unassailable position at the head of the market.

In the past two decades Monsanto has pioneered the commercialization of genetically modified organisms, or GMOs. GMO varieties of corn and soybeans now account for more than 90 percent of those crops in the U.S., but have faced strong opposition from consumers across Europe and are banned or tightly controlled in many countries.

That may account for the high break-up fee. The combined company could account for more than 30 percent of the global crop-inputs business, stoking concern that the deal could be rejected by competition authorities. The recent industry consolidation also leaves fewer buyers for any assets Bayer-Monsanto might need to sell to satisfy regulators.

Founded in 1901, Monsanto in the past also produced pharmaceuticals and industrial chemicals, including toxic substances such as polychlorinated biphenyls, now banned and commonly known as PCBs, and the herbicide Agent Orange, which was used by the U.S. military in Vietnam. Bayer, founded in 1863, trademarked the name “heroin” as a cough remedy in 1896 and then introduced aspirin -- the first true blockbuster drug -- in 1899.

-- Additional reporting by Bloomberg's Aaron Kirchfeld