This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The US Justice Department has agreed to a settlement with Disney that will allow it to purchase most of 21st Century Fox’s assets.

As part of the settlement, Disney will have to sell off 22 of Fox’s regional sports networks.

Disney’s purchase isn’t yet final. The settlement must first be approved by a federal judge, and Fox’s shareholders also have to vote in favor of the deal.

The government has been reviewing the deal for months.

The company first reached an agreement last December to buy most of Fox’s TV and movie assets. Disney sweetened its offer earlier this month after Comcast tried to gatecrash the deal.

Comcast has not said publicly whether it will try to counter again. Comcast did not immediately respond to a request for comment Wednesday.

Last week, Fox said it would still consider bids from other companies, even though it believed Disney’s new offer was better than Comcast’s.

21st Century Fox is the next big prize as the media industry consolidates to survive against competitors such as Netflix and Facebook.

If Disney closes the deal, it will get Fox’s movie studio along with cable channels like FX and National Geographic. Disney would also get Fox’s stake in the streaming service Hulu, along with its stake in the European broadcaster Sky.