The closing followed settlements with a coalition of US states and a Hollywood writers union, which removed the main legal barriers to one of the largest mergers in media history.