The announcement ends one of the biggest battles in the media industry this year, as Comcast fought with Disney to acquire Fox's movie studio and television assets. Disney had recently outbid Comcast's $65 billion all-cash offer with a $71 billion cash and stock offer.

Comcast CEO Brian Roberts said in a statement, "I’d like to congratulate Bob Iger and the team at Disney and commend the Murdoch family and Fox for creating such a desirable and respected company."

Complicating matters was Comcast's bidding for Sky, which is 39 percent owned by Fox. The two companies were also engaged in a bidding war there, with two new offers on the table last week, Fox's valuing Sky at $32.5 billion and Comcast's raising that to $34 billion.

CNBC's David Faber reported earlier this week that the U.S. government's decision to appeal a court ruling allowing AT&T to go ahead with its acquisition of Time Warner had given Comcast reason to pause in its pursuit of the Fox assets. The government had sought to block the AT&T deal on competitive grounds.

Fox's Rupert Murdoch was also seen as favoring the Disney offer, Faber reported, citing sources.

On CNBC on Thursday, Faber said he called Iger about the Comcast announcement and actually broke the news to the CEO. Iger replied, "Holy crap," according to Faber.

Iger also added that it was an exciting development and Disney will be working on regulatory approvals.

Disclosure: Comcast is the owner of NBCUniversal, parent company of CNBC, CNBC.com and this site.

Here is the statement:

Comcast Corporation (Nasdaq: CMCSA) today issued the following statement regarding its pursuit of the assets Twenty-First Century Fox has agreed to sell to The Walt Disney Company: “Comcast does not intend to pursue further the acquisition of the Twenty-First Century Fox assets and, instead, will focus on our recommended offer for Sky.”

Brian L. Roberts, Chairman and CEO, Comcast Corporation, said, “I’d like to congratulate Bob Iger and the team at Disney and commend the Murdoch family and Fox for creating such a desirable and respected company."