(Reuters) - Twenty-First Century Fox Inc FOXA.O agreed to sell its 39 percent stake in Sky PLC SKYB.L to Comcast Corp CMCSA.O, the companies said on Wednesday, a deal that completes the U.S. cable group's takeover and ends Rupert Murdoch's relationship with the UK-based satellite broadcaster.

Slideshow ( 2 images )

Comcast outbid Fox in an auction to take control of pay-TV group Sky on Saturday, with a $40 billion offer price. That price includes Fox’s 39 percent stake, which the offer valued at 11.63 billion pounds ($15.31 billion).

Walt Disney Co DIS.N, which agreed to buy Fox in June for $71.3 billion, said it had given consent to Fox's decision. Disney shares rose 1.8 percent on the New York Stock Exchange to $115.87 in midday trade.

Fox’s sale hands full control of the satellite TV company to Comcast Chief Executive Officer Brian Roberts, giving the U.S. cable company a global footprint of 53 million customers.

It also allows Disney to focus its resources on building direct-to-consumer products such as the Disney-branded streaming video service that is expected to launch late next year, the company said.

“When we launched Sky in 1989 it was four channels produced from a prefab structure in an industrial park on the fringes of west London,” Fox said in a statement. “We bet -- and almost lost -- the farm on launching a business that many didn’t think was such a good idea.”

Fox had previously agreed to sell the stake in Sky to Disney as part of Disney’s acquisition of Fox.

The sale of the Sky stake and the divestiture of regional sports networks will reduce Disney’s $71.3 billion cost for the Fox acquisition by roughly $30 billion, a source with knowledge of the matter said. That implies the anticipated sale of the sports networks will yield about $15 billion.

Sky’s Chief Executive Jeremy Darroch said: “Nearly 30 years ago Rupert Murdoch took a risk to launch Sky and in the process changed the way we watch television forever.

“With 21CF announcing its intention to sell its shares to Comcast we close one chapter while simultaneously opening another.”

(This version of the story corrects second paragraph to say $40 billion price includes Fox’s stake)