Moving to expand its product offerings aimed at treating hepatitis C, pharmaceutical giant Merck & Co. announced Monday that it has agreed to buy Cambridge, Ma.-based Idenix Pharmaceuticals, Inc., for $3.85 billion.

The terms of the deal, which has been approved by both companies’ boards of directors, calls for Whitehouse Station, N.J.-based Merck to acquire all outstanding shares of Idenix through a tender offer of $24.50 per share in cash. The offer values Idenix stock at triple the $7.23 per share price at which it closed trading on Friday.