Thermo Fisher Scientific Inc. (NYSE: TMO) will buy FEI Co. (Nasdaq: FEIC) for about $4.2 billion, gaining imaging technology for the life sciences and materials science industries.

The boards of the two companies unanimously approved the deal, in which Thermo Fisher will pay $107.50 a share in cash, the companies said in a statement Friday. That represents a 14 percent premium to FEI’s closing share price of $94.58 on Thursday.

FEI produces electron microscopes which are used to analyze proteins, giving Waltham, Massachusetts-based Thermo Fisher a complementary product line to its mass spectrometry systems. Based in Hillsboro, Oregon, FEI has more than 3,000 employees worldwide and has operations mainly in Europe and the U.S. FEI, which had 2015 revenues of $930 million, will become part of Thermo Fisher’s Analytical Instruments Segment.

The companies said they expect the deal to close by early next year. The transaction will immediately add about 30 cents to Thermo Fisher’s adjusted earnings in the first full year after the deal closes, the company said, and will also produce cost savings about $80 million within three years.

FEI shares rose 13 percent to $105.50 at 7:54 a.m. in New York trading before the market opened. Thermo Fisher closed at $151.20 Thursday.

Thermo Fisher has been acquiring genetic testing, diagnostics and research assets through a series of deals. In April, it bought Affymetrix Inc. for about $1.1 billion, adding technology used by scientists and biologists to analyze specimens at the cellular and genetic level. In 2015, the company acquired Advanced Scientifics Inc.

JPMorgan Chase & Co.  (NYSE: JPM)was Thermo Fisher’s financial adviser, and Wachtell, Lipton, Rosen & Katz its legal adviser. Goldman Sachs Group Inc. (NYSE: GS) was FEI’s financial adviser, and Wilson Sonsini Goodrich & Rosati PC provided legal advice.