After days of marathon negotiating sessions, CBS Corp. has reached an agreement to acquire Viacom, marking the latest twist in the saga of the media giants first brought together by Sumner Redstone in 1999.

The enlarged company will take taken on the moniker ViacomCBS Inc. The all-stock deal values Viacom at right around its current market cap of $11.7 billion — meaning that the acquisition premium was already reflected in Viacom’s share price after months of merger speculation. The deal calls for Viacom shareholders to receive .59625 shares of CBS Corp. for every Viacom share.

CBS and Viacom announced the agreement Tuesday after more than 48 hours of intense final-lap negotiations between the boards of both companies. Scrutiny of the transaction by CBS and Viacom shareholders outside the Redstone orbit will be strong, given the history between the companies.

Viacom CEO Bob Bakish will lead the combined enterprise as president-CEO. Joe Ianniello, president and acting CEO of CBS for the past year, will become chairman-CEO of CBS, leading the Eye-branded assets. Shari Redstone will become chairman of ViacomCBS, moving into a seat that was occupied by her father until early 2016.

“I am really excited to see these two great companies come together so that they can realize the incredible power of their combined assets. My father once said ‘content is king,’ and never has that been more true than today,” Shari Redstone said in a statement. “Through CBS and Viacom’s shared passion for premium content and innovation, we will establish a world-class, multiplatform media organization that is well-positioned for growth in a rapidly transforming industry. Led by a talented leadership team that is excited by the future, ViacomCBS’s success will be underpinned by a commitment to strong values and a culture that empowers our exceptional people at all levels of the organization.”

The deal is expected to close by year’s end. The combined entity is projecting $500 million in synergy savings within two years through the elimination of overlapping corporate operations and other initiatives. The combined company will have about $28 billion in revenue.

ViacomCBS immediately touted its reach and the depth of its content vault. CBS and Viacom together have some 140,000 episodes of TV series and 3,600 film titles. ViacomCBS asserted that its combined platforms account for 22% of all television viewing in the U.S., ahead of Comcast (18%) and Disney (14%).

At present ViacomCBS companies together have 750 TV series ordered to production. Combined, the companies spent $13 billion during the past 12 months on content across CBS’ local and national platforms, Showtime, Viacom’s cable and international channels and Paramount Pictures. Both companies have sought to expand their focus beyond the U.S. in recent years with Viacom’s acquisition of the U.K.’s Channel 5 and Argentina’s Telefe and CBS’ acquisition of Australia’s Network 10.

“Today marks an important day for CBS and Viacom, as we unite our complementary assets and capabilities and become one of only a few companies with the breadth and depth of content and reach to shape the future of our industry,” said Bakish. “Our unique ability to produce premium and popular content for global audiences at scale – for our own platforms and for our partners around the world – will enable us to maximize our business for today, while positioning us to lead for years to come. As we look to the future, I couldn’t be more excited about the opportunities ahead for the combined company and all of our stakeholders – including consumers, the creative community, commercial partners, employees and, of course, our shareholders.”

Ianniello’s role was the focus of much wrangling as the merger discussions accelerated during the past week. He is set to oversee CBS-branded assets with a level of autonomy but he will report to Bakish. Showtime and CBS’ Simon & Schuster publishing arm will no longer be part of Ianniello’s portfolio. Showtime chief David Nevins and Simon & Schuster chief Carolyn Reidy will report directly to Bakish.

“This merger brings an exciting new set of opportunities to both companies. At CBS, we have outstanding momentum right now – creatively and operationally – and Viacom’s portfolio will help accelerate that progress,” Ianniello said. “I look forward to all we will do together as we build on our ongoing success. And personally, I am pleased to remain focused on CBS’s top priority – continuing our transformation into a global, multiplatform, premium content company.”

The boards sought to blend senior executives from both companies in the top corporate roles. CBS’ Christina Spade will serve as exec VP and chief financial officer of ViacomCBS. Viacom’s Christa D’Alimonte will be exec VP, general counsel and secretary. Wade Davis, Viacom’s current CFO, will exit after the transaction is closed given the lack of a senior operating role for the executive who has essentially functioned as a chief operating officer for Bakish during the past three years.

The combined company’s 13-member board will consist of six CBS appointees, four from Viacom plus Bakish, Redstone and another board member designated by National Amusements. When the deal is sealed, current CBS shareholders will own about 61% of the enlarged company.

The road to the reunion for CBS and Viacom has been rocky during the past few years. CBS’ previous management regime led by former chairman-CEO Leslie Moonves had balked at the prospect of a reunion — so much so that the CBS board filed a lawsuit against Redstone in May 2018. (See timeline below)

But Moonves’ ouster from CBS last September, amid sexual misconduct allegations, and changes to the CBS board at that time greatly increased the likelihood of a re-merger. CBS and Viacom were formally united in 2000 but split up again in 2006 because of Sumner Redstone’s frustration with Viacom’s sagging stock price.

CBS and Viacom shares have been trending up since late June on anticipation of another merger effort. There’s been chatter on Wall Street that the melding of CBS and Viacom is the first step in a larger effort to expand the company through more acquisitions. Discovery Inc. and Lionsgate have been mentioned as possible targets. CBS has already been in discussions with Lionsgate to acquire the Starz premium cable group.

The push by Shari Redstone to bulk up CBS and Viacom comes as both companies have been dwarfed in size and scope by the tech giants who have barrelled into media in the past few years. Disney, Comcast, AT&T (through its acquisition of Time Warner) have also grown dramatically during the past two decades. It’s understood that Shari Redstone is also open to the possibility of selling the combined company down the road.

Longtime Viacom executive Bakish was named CEO of Viacom in December 2016 as the company was reeling from corporate drama involving the Redstones and former Viacom CEO Philippe Dauman. Ianniello has been acting CEO of CBS since Moonves’ exit in September. Both Bakish and Ianniello have been with their respective companies since 1997, before the original merger was set in 1999.

The new deal will bring together Viacom’s suite of TV brands — including MTV, Nickelodeon, Comedy Central, BET and VH1 — and Paramount Pictures with the CBS broadcast network, CBS Television Studios, CBS Interactive (home of CBS All Access), Showtime, Pop, CBS’ 50% interest in the CW, CBS’ 28 local television stations and publisher Simon & Schuster.

CBS in recent years has slimmed down its holdings to focus squarely on content production and distribution. The company has reaped the rewards of the changing content marketplace, mining new riches from the global hunger for original series and vintage library content. In the 2006 divorce, CBS took possession of Paramount’s television archive, which proved incredibly lucrative as Netflix and others came on the scene with a big checkbook and insatiable demand for programming.

Viacom, on the other hand, struggled under the leadership of Dauman. The company was faulted for failing to invest in content and R&D and for slow reaction to the massive shifts in how viewers watch television. CBS was a pioneer in subscription streaming arena with the launch of the CBS All Access in 2014. Viacom launched copyright infringement litigation battle against YouTube in 2007 that was settled seven years later.

Here is a timeline of key events for CBS and Viacom over the past 20 years:

1999:

SEPTEMBER: Sumner Redstone’s National Amusements Inc. sets $40 billion deal to acquire CBS and merge it with Viacom

2000:

MAY: Viacom completes CBS acquisition, including the purchase of King World Productions

2005:

JUNE: National Amusements announces plan to split CBS and Viacom into separate companies again

2006:

JANUARY:

** CBS splits from Viacom under the leadership of CEO Leslie Moonves. Tom Freston named CEO of Viacom.

** CBS folds UPN into joint venture with Warner Bros.’ WB Network to create CW Network

SEPTEMBER: Longtime Sumner Redstone attorney Philippe Dauman replaces Freston as CEO of Viacom

2007:

MARCH: Viacom files $1 billion copyright infringement lawsuit against YouTube and Google

2008:

MAY: CBS buys CNET Networks for $1.8 billion

2013:

MARCH: CBS buys 50% of TV Guide Network, co-owned with Lionsgate

2014:

MARCH: Viacom, Google settle lawsuit

JUNE: CBS completes spinoff of its outdoor advertising division, honing its focus on content production and distribution

SEPTEMBER: Viacom buys U.K. broadcaster Channel 5

OCTOBER: CBS launches CBS All Access subscription streaming service

2016:

FEBRUARY: Sumner Redstone resigns as chairman of CBS and Viacom amid shareholder pressure and questions about his mental competency. He is named chairman emeritus of both companies.

MAY:

** Sumner Redstone removes Philippe Dauman and George Abrams as trustees of the trust that will inherit his National Amusements holdings after his death.

** Dauman, Abrams file suit to block the move, accusing Shari Redstone of usurping her aging father’s power

JUNE: National Amusements moves to replace five members of Viacom’s board of directors.

AUGUST: Dauman is forced out at Viacom, five new Viacom board members are elected

SEPTEMBER: CBS nudged to the altar with Viacom by National Amusements

NOVEMBER:

** Shari Redstone says she believes that scale matters in media and says she “wasn’t a great proponent” of the 2006 separation of CBS and Viacom.

** Viacom acquires Argentine broadcaster Telefe for $345 million

DECEMBER:

** National Amusements withdraws its support for CBS-Viacom merger talks.

** Bob Bakish named permanent CEO of Viacom

2017:

MAY: Moonves extends his contract as CBS chairman-CEO through mid-2021

2018:

FEBRUARY: The boards of CBS and Viacom establish special committees to explore a merger

MARCH: CBS completes spinoff of radio division

MAY: CBS board of directors sues National Amusements, Shari Redstone for breach of fiduciary duty

JULY:

** First reports of sexual misconduct allegations against Moonves surface in New Yorker expose

** Viacom acquires AwesomenessTV

SEPTEMBER:

** Moonves is forced out of CBS.

** The CBS board and National Amusements settle their litigation.

** Six new CBS board members are elected.

** CBS chief operating officer Joe Ianniello named acting CEO.

OCTOBER:

** Showtime Networks CEO David Nevins named chief content officer for CBS Corp.

** Showtime’s Christina Spade named chief financial officer of CBS Corp.

2019:

JANUARY: Viacom acquires ad-supported streaming platform Pluto TV for $340 million

MARCH: CBS buys out Lionsgate’s 50% stake in Pop (formerly TV Guide Network)

APRIL: Ianniello’s contract as CBS acting CEO is extended through Dec. 31

AUGUST: CBS and Viacom unveil merger agreement after a weekend of marathon negotiations.

(Pictured: Bob Bakish, Shari Redstone, Joe Ianniello)