Viacom Inc. (Nasdaq: VIAB) shaved more than $7 million off potential annual interest costs after its controlling shareholder publicly urged a merger with CBS Corp. (NYSE: CBS)just as the media giant was kicking off a $1 billion bond sale.

Keen to get in before a media remarriage, debt investors submitted some $15 billion of orders for the bonds, people with knowledge of the matter said, and Viacom ultimately raised $1.3 billion. The demand allowed Viacom to lower the yield on parts of the offering by about 0.7 of a percentage point.

The Redstone family, which controls both Viacom and CBS, formally asked the companies to consider a merger on Sept. 29. It came after Viacom, owner of MTV and Comedy Central, last week lowered its profit forecasts, halved its dividend and said it would tap capital markets. Expectations of a deal, which would recombine companies that the family split a decade ago, spurred a rally in Viacom’s securities.

Investors had been fretting about the company’s credit rating, which is teetering on junk, and Viacom moved to reassure them of its commitment to maintaining an investment-grade rating this week before news of the potential CBS deal became public.

Moody’s Investors Service said a merger with CBS “could potentially shore up Viacom’s fundamental and financial profile.” The ratings firm, which last week cut the company’s credit grade to one level above junk, said it could raise Viacom if a deal is “completed in a manner not detrimental to bondholders.”

“The probabilities of a merger are higher now,” said Eduardo Simpson, an analyst at Taplin Canida & Habacht, which oversees $10.5 billion, including Viacom and CBS debt. “Viacom bonds are still trading very wide to CBS. You have the potential for a lot of tightening if it were to happen.”

After rallying on news of the potential merger, Viacom’s most actively traded debt, a $1.45 billion, 4.375 percent bond due in 2043, is yielding about 2.6 percentage points more than Treasuries, according to Trace, the bond price reporting system of the Financial Industry Regulatory Authority. CBS’s most active 30-year bond yields about 2.05 percentage points over Treasuries.

Viacom sold $900 million of 3.45 percent 10-year bonds that yield 1.95 percentage points more than Treasuries, according to data compiled by Bloomberg. That’s down from an initial offer of around 2.5 percentage points, the people said, asking not to be identified as the matter is private. The company’s $400 million of 2.25 percent five-year notes yield 1.2 percentage points more than Treasuries.

Before National Amusements Inc., the largest shareholder of both Viacom and CBS, proposed that the two companies merge in an all-stock combination, Viacom executives took steps to placate investors that the company would maintain its blue-chip ratings, according to people familiar with the discussions. The bonds carry a provision that will boost the coupon paid to investors if Viacom’s ratings fall to junk.

Moody’s said it would affirm CBS’s ratings if a deal was struck. CBS is rated Baa2 by Moody’s and an equivalent BBB by S&P Global Ratings.

A merger could produce cost savings and help both companies contend with a changing media industry, National Amusements, the Redstone family’s holding company, said in its statement. Viacom’s cable channels, with more than $10 billion in annual revenue, have lost their hold on young viewers to YouTube, Snapchat, Netflix and other online competitors. The combined company would rival Time Warner Inc. and 21st Century Fox Inc., spanning broadcasting, cable TV and motion pictures.

“There’s certainly the possibility that Viacom bondholders will be in a much better situation six months from now,” said Dave Novosel, an analyst at research firm Gimme Credit. “What I think they need to be saying is, ‘what are the probabilities that a deal like this goes through?’”