Intel has agreed to purchase chipmaker Altera for $16.7 billion. It will be an all-cash deal, and it will help Intel increase its data server capabilities, CNet reported.

The deal will have Intel paying $54 per share of Altera, Intel said Monday. Intel's offer is 11 percent higher than Altera's closing price on Friday. Intel expects to close the deal in six to nine months.

A possible purchase of Altera by Intel was rumored for months. The companies first started negotiating in March. Since then, shares of Altera have risen by 40 percent.

News of the deal sent shares of Altera up 4.8 percent before the market opened Monday morning.

"With this acquisition, we will harness the power of Moore's Law to make the next generation of solutions not just better, but able to do more," Intel CEO Brian Krzanich said.

Intel, based in Santa Clara, California, is the world's largest chipmaker. The company powers most personal computers and data-center servers. Altera, based in San Jose, California, makes chips called field-programmable gate arrays. These chips can be reprogrammed for specific tasks and are often used in the automotive, aerospace and medical industries.

Intel and Altera already work together. On Monday, Intel said it plans to use Altera's products within its Xeon data-server chips.

Intel is trying to find a way to reduce slowing growth combined with rising costs and trying to defend its most profitable business, Bloomberg reported.

"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."

By acquiring Altera, Intel will also be able to build up its data-center business, where it has been a dominant player. With the popularity of cloud-based computing, Intel has been cashing in with a 31 percent increase in profit from its server business in 2014. Cloud-based computing is not going away, and Intel will want to focus on it as other areas of its business have struggled to maintain growth lately.