Brace yourself for a giant beer merger.

Budweiser maker Anheuser-Busch InBev (BUD) wants to buy SABMiller.

A merger would create a "super brewery" with nine of the world's top 20 beers by volume, and annual sales of $55 billion. Shares in both companies shot up -- the combined group would be worth about $276 billion at Wednesday's prices.

SABMiller (SBMRY), which makes lagers such as Pilsner Urquell and Peroni, said it had no details yet of the planned takeover offer.

If the deal happens, it will be the biggest merger in brewing history, and could rank among the top 10 takeovers of all time, according to Dealogic and EY.

AB InBev, the world's biggest brewer by volume, has been interested in making a bid for SABMiller -- the world number two -- for a while. Sales of Bud, and Bud Light, have been waning for years, putting AB InBev in a tough spot.

Large mainstream brewers have also been struggling to defend their market in the face of a craft beer boom.

Related: How to start a successful craft beer company

As younger drinkers turn in ever greater numbers to independent breweries, the global market leaders have been trying to get in on the act.

AB InBev has swallowed Seattle's Elysian Brewing, Oregon's 10 Barrel Brewing and Chicago-based Goose Island in the last year or two.

SAB Miller has also tapped into the craft beer scene, buying one of UK's most successful independents, London's Meantime Brewing Company, in May.

Analysts say the mega deal could provide some breathing space for the large brewers but is unlikely to reverse the trend.

"[It] can perhaps provide some last drops of stock market intoxication but will remain largely irrelevant to the scores of millennials seeking alternatives to big beer's offerings," said Spiros Malandrakis, senior analyst at Euromonitor International.

SABMiller shares surged by 21% in London. Shares in AB InBev were up about 8%.

Shares in Molson Coors (TAP) jumped 13% on speculation that the company could pick up some brands that the new group may be forced to sell to get regulatory approval for the merger.

Under UK takeover rules, AB InBev has until October 14 to make a formal bid or abandon the plan.

Related: Is the British pub Dying? 29 close each week

-- Alanna Petroff, Virginia Harrison and Paul LaMonica contributed to this article.