Medical device maker Hologic Inc. said Monday it would acquire diagnostic test maker Gen-Probe Inc. for about $3.7 billion in cash to expand its molecular diagnostic business, international presence and cross-selling opportunities.

Shares of Gen-Probe Incorporated (Nasdaq: GPRO) soared $12.84, or 18.68 percent, to close at $81.55 in Monday's trading. Shares of Hologic, Inc. (Nasdaq: HOLX) fell $2.11, or 9.94 percent, to end at $19.12.

Under the deal, shareholders of Gen-Probe will receive $82.75 a share, the companies said in a statement Monday. That's about 20 percent above San Diego-based Gen-Probe's Friday closing price of $68.72. The transaction is expected to close in the second half of 2012 and should result in $75 million in cost savings in the first three years and about $40 million in the first year.

Hologic will fund the deal through available cash, as well as additional financing of term loans and high yield securities.

Gen-Probe, which dominates testing for sexually transmitted diseases, had put itself up for auction last year and Swiss healthcare giant Novartis AG (NYSE: NVS), which has a partnership with Gen-Probe, appeared to be the most likely buyer before it dropped out of the race last July.

Gen-Probe is an ideal partner and strategic fit to Hologic's existing diagnostics business and complements our focus on scaling and diversifying our diagnostics franchise, Robert A. Cascella, chief executive of Hologic, said in a statement. Our combined company will be well positioned globally to capitalize on the fast-growing molecular diagnostics market with an established global infrastructure.

Hologic, which provides products for mammography and cervical cancer screening, has more than 500 employees in China and plans to market Gen-Probe's products in both developed and emerging markets. The Bedford-Mass.-based company bought TCT International, a Chinese distributor of medical products for $135 million in cash.

Gen-Probe reported better-than-expected first-quarter results Monday, while Hologic swung to a loss for the fiscal second quarter of $40.3 million, or 15 cents per share, compared with a net profit of $82.4 million, or 31 cents per share, in the same year-ago period.