BRUSSELS/LONDON (Reuters) - The world's top two brewers, Anheuser-Busch InBev (>> ANHEUSER-BUSCH INBEV) and SABMiller (>> SABMiller plc), have agreed in principle to one of the biggest mergers in corporate history after a near month-long courtship resulted in SABMiller accepting an offer worth more than $100 billion.

The planned combination announced on Tuesday would marry AB InBev's Budweiser, Stella Artois and Corona brands with SABMiller's Peroni, Grolsch and Pilsner Urquell and brew almost a third of the world's beer, dwarfing other major producers like Heineken (>> HEINEKEN) and Carlsberg (>> Carlsberg A/S).

If it goes through, the deal would rank as the fourth-biggest takeover in history and the largest deal for a UK company. It also breaks all records in the consumer sector and comes only days after news that Dell Inc [DI.UL] and EMC (>> EMC Corporation) agreed the biggest ever deal in the technology sector.

Mergers and acquisition deals done this year stand at a record high as low interest rates embolden companies searching for new areas of growth.

For AB InBev the SABMiller deal will give it more breweries in Latin America and Asia and an entrance to Africa at a time when some of its home markets such as the United States are weakening as drinkers shun mainstream lagers in favur of craft brews and cocktails.

Africa is expected to see a sharp rise in the legal drinking age population in the next few years and a fast-growing middle class which prefers branded lagers and ales to the illicit brews which have long been a feature of markets there.

CLOSING TIME

An agreement between AB InBev and SABMiller was reached on Monday evening, just two days before a deadline that would have forced AB InBev to make a formal bid or walk away for six months.

The breakthrough came when AB InBev bumped up the main offer price for a fourth time, to 44 pounds in cash per SABMiller share, as well as raising the value of an partial share alternative offer by 4 percent to 39.03 pounds per share.

The partial share offer was expressly designed to suit SABMiller's two biggest shareholders, cigarette-maker Altria (>> Altria Group Inc) and the Santo Domingo family of Colombia, who together own nearly 41 percent of the company.

SABMiller said its board was now prepared in principle to recommend the main cash offer to shareholders and has asked for a two-week extension to the deadline, which is now Oct. 28.

Altria, with a 26.6 percent stake, said it was pleased with the deal, although it had also endorsed an earlier lower offer last week. The Santo Domingos, seen by banking sources as the holdouts who helped secure the higher offer, have not made any public comments.

Meanwhile South Africa said it would need to assess the tax implications of a merger and could "in the extreme" try to block it.

SAB shares closed up 9 percent at 39.55 pounds in London, while AB InBev shares closed up 1.7 percent in Brussels.

"We have written extensively on the attractions of (an ABI/SAB combination) since 2011 and continue to see major long-term benefits for ABI shareholders," said Canaccord Genuity analysts.

Yet analysts say the benefits will not come easily, even for AB InBev with its well-known track record for making a series of successful acquisitions.

"We think AB InBev must extract close to $2 billion in annual cost savings in order to create value from this deal," said Morningstar analyst Phil Gorham. "After closure, effective execution will be required."

The accepted offer of 44 pounds a share increases a proposal made on Monday to pay 43.50, which in turn was an increase on a 42.15 offer which AB InBev made public last week after previous proposals of 38 pounds and then 40 pounds had been turned down.

Based on AB InBev's share price on Tuesday the company is offering to pay 68.5 billion pounds ($104.2 billion).

However, Neil Wilkinson, senior equities fund manager at Royal London Asset Management and an AB InBev investor, said he was pleased with the deal, "which will enable AB InBev to perpetuate its growth story."

FOLLOW-ON DEALS

The merger is also expected to have repercussions for the rest of the industry, particularly in the United States where the two companies would have about 70 percent of the beer market unless they sell off some assets.

Denver-based Molson Coors (>> Molson Coors Brewing Company) is widely seen by analysts as the logical buyer of SABMiller's 58 percent stake in their U.S. joint venture.

In addition analysts say the combined group might also have to sell interests in China, where SABMiller's CR Snow joint venture with China Resources Enterprise (>> China Resources Enterprise, Limited) is the market leader.

Businesses in Eastern Europe could also come up for sale, they say, which could be attractive to rivals such as Heineken and Carlsberg looking to narrow the gap with the new group.

And the deal may also bring change in the soft drinks sector, where SABMiller is a large distributor for Coca Cola (>> The Coca-Cola Co) while AB InBev has ties with rival PepsiCo (>> PepsiCo, Inc.).

Bernstein Research beverage analyst Trevor Stirling said that he rated the chances of the deal going through at 80 percent, with antitrust issues being the main risk.

"There is a chance that due diligence throws up something nasty," he said, but added that SABMiller was unlikely to have accepted AB InBev's approach if they knew of any major problems.

(Additional reporting by Kate Holton, Sinead Cruise and Freya Berry; Editing by Keith Weir and Greg Mahlich)

By Philip Blenkinsop and Martinne Geller