Intel Corp. agreed to buy Altera Corp. for $16.7 billion to defend its presence in data centers, forging a deal that will add to a record year for industry consolidation.

The world’s largest chipmaker will pay $54 a share in cash for the maker of programmable logic semiconductors, Intel said in a statement Monday. That’s a premium of 11 percent over Altera’s closing share price on Friday and 56 percent from March 26, the day before the possibility of a transaction was first reported.

Intel, like other chipmakers, is seeking to contend with growth and rising costs, while trying to defend its most profitable business. The largest deal ever in the $300 billion semiconductor business was announced last week when Avago Technologies Ltd. agreed to buy Broadcom Corp. for $37 billion.

“Management teams are looking at their business and predicting little growth going forward,” said Gus Richard, an analyst at Northland Securities Inc. “The M&A wave is a function of them trying to drive earning growth. Intel’s purchase of Altera is one of the few strategic moves that is being made currently.”

Intel’s Altera purchase and Avago’s Broadcom deal makes 2015 already a record year for semiconductor deals.

The Altera purchase will add to Intel’s non-GAAP earnings per share and free cash flow in the first year after it closes, which is expected within six to nine months, the company said. The deal will be funded with cash and debt.

Altera’s stock rose 6.2 percent to $51.86 at 10:11 a.m. in New York, following the announcement. Intel’s shares fell 1.3 percent to $34.

Altera earlier rejected an Intel bid, spurring some shareholders to pressure Altera to reconsider an offer they thought valued the company higher than it would be on its own.

Intel has been looking for growth beyond the struggling personal-computer market, which has been declining since it peaked in 2011. Altera chips are used in a variety of markets, ranging from communications to consumer electronics.

Altera’s devices can have their function updated, even after they’ve been installed in end-devices. While they’re sold in relatively small volumes, programmable logic usually requires the latest in production technology because it’s some of the largest chips in the industry.

Intel Chief Executive Officer Brian Krzanich is trying to find more customers, outside of his own chip business, for Intel’s factory network, which the company says is the most advanced in the industry. Altera has been the biggest customer of that fledgling effort.

“The acquisition will couple Intel’s leading-edge products and manufacturing process with Altera’s leading field- programmable gate array (FPGA) technology,” Intel said in the statement. “The combination is expected to enable new classes of products that meet customer needs in the data center and Internet of Things market segments.”

Acquiring Altera may help Intel defend and extend its most profitable business: supplying server chips used in data centers. While sales of semiconductors for PCs are declining as more consumers rely on tablets and smartphones to get online, the data centers needed to churn out information and services for those mobile devices are driving orders for higher-end Intel processors and shoring up profitability.

Sales at Intel’s data-center division rose 19 percent in the first quarter as Internet companies such as Google Inc. and Facebook Inc. built out their server operations.

As a part of Intel, Altera will continue to support designs that couple its chips with others designed on ARM Holdings Plc technology. Companies such as Qualcomm Inc. are preparing to use that to try to break Intel’s dominance in data-center chips, where it has more than 98 percent of the market.

JPMorgan Chase & Co. and Rothschild Inc. advised Intel on the deal, while Goldman Sachs Group Inc. worked for Altera, according to the statement. Gibson, Dunn & Crutcher LLP and Weil, Gotshal & Manges LLP provided legal advice to Intel, and Wilson Sonsini Goodrich & Rosati PC gave legal counsel to Altera.