Swiss drugmaker Roche Holding AG (ROG.VX) said Thursday it has agreed with Genentech Inc. (DNA) to buy the 44% of the U.S. biotech company that it doesn't already own for around $46.8 billion.

Roche, based in Basel, said it expects the transaction to be accretive to earnings in the first year after closing.

The agreement ends a nearly eight month battle, in which Genentech repeatedly rejected Roche's offer.

Last Friday, Roche increased the offer price to $93 a share. The agreement reached now is for a slightly higher price of $95 a share.

"We believe this is a fair offer for Genentech shareholders," said Charles Sanders, chairman of a special committee of independent Genentech board members in a statement. "We look forward to working with Roche to complete the transaction as expeditiously as possible."

Company Web site: www.roche.com

-By Anita Greil, of Dow Jones Newswires; +41 43 443 8044; anita.greil@dowjones.com