Shares of Amgen jumped nearly 8 percent on Monday following the announcement that the Thousand Oaks biopharmaceutical company will buy cancer drug maker Onyx Pharmaceuticals Inc. for $10.4 billion.

Amgen will pay $125 a share for the South San Francisco company. That represents only a slight premium to its original June 30 offer of $120. The Onyx board rejected the $120 price saying it significantly undervalued the company, but accepted the slightly sweetened deal.

“After a careful and thorough evaluation process, our board of directors has determined that the all-cash transaction with Amgen maximizes value for our stockholders and expands the potential of our commercial medicines,” said Onyx Chairman and Chief Executive Tony Coles, said in a statement.

Onyx has three primary commercial drugs: Kyprolis, a treatment for some blood cancers; Nexavar, a drug for liver and kidney cancer; and Stivarga, a colon cancer drug.

Amgen Chief Executive Robert Bradwaysaid the acquisition will accelerate growth and enhance value for his shareholders. In particular, the company plans to expand the global market for Kyprolis.

“Amgen has a unique opportunity to add value to Kyprolis, a product which is at an early and promising stage of its launch,” he said in a statement. “Our acquisition of Onyx follows a thorough due diligence process and is fully consistent with our strategy of advancing innovative medicines that address serious unmet medical needs.”

Amgen will make the acquisition, announced Sunday, through a tender offer. The deal is expected to close by Oct. 1.

Shares of Amgen gained $8.15, or 7.7 percent, to close at $113.75. Shares of Onyx gained $6.53, or 5.6 percent, to close at $123.49. Both issues trade on the Nasdaq.