File photo of a pharmacist selecting drugs REUTERS

After a previously unsuccessful bid to acquire Onyx Pharmaceuticals Inc. (NASDAQ:ONXX), Amgen Inc. (NASDAQ:AMGN) struck a deal, on Sunday, to buy the South San Francisco-based pharmaceutical firm for $10.4 billion in an effort to tap into the cancer drug market -- one of the biggest and fastest-growing in the world.

Amgen will acquire outstanding shares of Onyx for $125 a share in cash, up from $120 a share offered in the initial bid in June, which Onyx had rejected claiming it undervalued the company.

Onyx’s appeal stems from the fact that it has a growing product line of cancer drugs, including Kyprolis, which is used for treating cancer of plasma cells, and has three partnered cancer drugs in the market, including Nexavar and Stivarga. The company also has multiple cancer drugs in various stages of development.

Amgen intends to make a tender offer and expects to close the transaction at the beginning of the fourth quarter, after winning regulatory approval, the companies said in a joint statement.

“Amgen has a unique opportunity to add value to Kyprolis, a product which is at an early and promising stage of its launch,” Robert A. Bradway, Amgen's chairman and CEO, said in the statement.

Amgen is expected to benefit from winning global rights to Onyx’s cancer drugs, including Kyprolis, and will also boost Amgen’s late-stage pipeline of nine products, four of which are cancer drugs.

The deal comes at a time when pressure has been mounting on Amgen to revamp its drug development program after a breakdown in sales of its flagship anemia medicine over safety concerns, while patents on four of Amgen’s five best-selling drugs are slated to expire starting in 2015.

Onyx earned $362.2 million in revenues and registered a net loss of $187.8 million last year, according to Los Angeles Times, and its shares closed at $116.96 on Friday, while shares of Thousand Oaks, Calif.-based Amgen closed at $105.60. On Monday, Amgen's shares rallied 4.73 percent to $110.6 while Onyx's shares climbed 5.75 percent to $123.68 in pre-market trading.