Vivendi said on Thursday it had agreed to sell its 20 percent stake in U.S. media group NBC Universal to majority-owner General Electric for $5.8 billion, clearing the way for a separate deal under which GE would give Comcast Corp control over NBCU.

This transaction is in line with Vivendi's strategic objectives and is in the best interests of its shareholders, Vivendi CEO Jean-Bernard Levy said in a statement.

Vivendi is determined, at the start of a new decade, to pursue its profitable growth strategy, he added.

Europe's largest entertainment group had been widely expected to exit NBCU, a holding it has described as non-core as it is looking to simplify the group's structure around its telecoms, music, video games and pay-TV businesses.

The deal marks the sale of the last asset Vivendi had inherited from the costly expansion drive by former head Jean-Marie Messier.

The agreement between GE and Vivendi comes after weeks of intense negotiations.

Last week, GE Chief Executive Geoffrey Immelt came to Paris to accelerate the talks, which were slowed by differences over valuation and over when Vivendi would get paid for the sale.

By 1159 GMT, Vivendi shares were down 0.12 percent at 20.20 euros, in line with the European media sector ,.SXMP>

If the GE-Comcast transaction is not completed by September 2010, Vivendi will sell 7.66 percent of NBCU to GE for $2 billion, with the remainder 12.34 percent, sold for $3.8 billion to GE upon completion of the deal, the statement said.

If the GE-Comcast deal was not completed at all, Vivendi would launch an accelerated initial public offering of its remaining 12.34 percent in NBCU.

Vivendi will also continue to receive quarterly dividends from NBCU betwen now and the completion of GE-Comcast deal.

Investors had braced themselves for an announcement as early as this week after a source familiar with the matter recently said that Vivendi and General Electric had agreed in principle to a deal in which GE could buy Vivendi's stake for $5.8 billion.

The sale should give Vivendi additional financial headroom after it recently gained control of Brazilian telecoms operator GVT, and as it is keen to seize other acquisition opportunities in emerging countries.

Under a 2004 pact with General Electric, which owns 80 percent of NBCU, every year between mid-November and mid-December, Vivendi had to decide whether to exercise its put option to sell its stake. It could also have demanded an initial public offering for NBC Universal instead.

This year Vivendi's plans toward its NBCU stake had been under intense media scrutiny as they were seen key to Comcast's plan to buy 51 percent stake in a proposed joint venture with GE, which would be the biggest media deal this year.

The two companies had agreed to value NBC Universal at about $30 billion. But the deal hinged on Vivendi selling its stake to GE.

The NBCU transaction is the third large deal sealed by Vivendi Chief Executive Jean-Bernard Levy this year in moves that further streamline and refocus the group's portfolio.

Last month, Vivendi gained control of GVT, the Brazilian broadband operator, in a deal worth 2.8 billion euros.

Vivendi, which owns Maroc Telecom, has said it is keen to expand in emerging markets, given its mature portfolio, which includes France's second-biggest mobile phone operator SFR.

In November, Vivendi, which owns 65 percent of pay-TV unit Canal Plus, also agreed to buy a 9.9 percent stake held by French broadcaster TF1 for 744 million euros. It has also offered to buy another 5.1 percent holding in Canal Plus owned by French TV group M6.

(Editing by Marcel Michelson)