It's official: Intel is buying Altera.

Altera shareholders will get $54 a share in cash. The deal between the companies is worth $16.7 billion.

Reports over the weekend indicated that the world's largest chip maker and Altera were close to completing a deal that was likely to be announced Monday.

In a statement, Intel CEO Brian Krzanich said: "Intel's growth strategy is to expand our core assets into profitable, complementary market segments.

"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. Whether to enable new growth in the network, large cloud data centers or IoT segments, our customers expect better performance at lower costs."

The boards of both companies have agreed to the deal.

The deal has been in the works for a while. In April, Altera rejected Intel's unsolicited offer of $54 a share after several months of negotiations.

And according to Reuters, Intel signed a standstill agreement with Altera that would have expired Monday and given it the option to start a hostile bid.

Altera shares were up as much as 4% in premarket trading on the news, having closed at $48.85 a share on Friday. Intel was higher but little changed.

This is the second massive deal in the semiconductor industry that has been recently announced. Last Thursday, Avago Technologies announced it was buying Broadcom for $37 billion — the largest deal ever between chip makers.

More to come ...