Brewing giant SABMiller agreed to buy Foster's Group for a sweetened price of A$9.9 billion ($10.2 billion) on Wednesday after talks between the two last week ended in a couple of beers which sealed the deal this week.

Peace broke out in the acrimonious three-month bid battle as SABMiller Chief Executive Graham Mackay offered to raise its cash bid by 20 cents to A$5.10 a share, and then sat down with Foster's Chairman David Crawford to celebrate with a beer.

It became obvious that we were not that far apart so we started talking last week and this week I sat down with David Crawford for a couple of beers, Mackay told a briefing after announcing the takeover of Australia's biggest brewer.

As part of the deal, Melbourne-based Foster's will also return 30 cents a share as a capital return it promised in August after a tax refund and pay a final dividend of 13.25 cents. The total value of the deal, including debt, is A$11.5 billion.

Mackay expects that SABMiller's biggest ever takeover deal will close by the end of the year and put SABMiller at the head of the Australian beer market with a near-50 percent share and give the combined group an uplift from Australia's strong economic growth prospects.

Foster's Chief Executive John Pollaers said the deal offers outstanding value for Foster's shareholders, and emphasized the strength of the 150-year-old Australian beer maker having sought to turn around the business since his appointment in May.

Today highlights once again the very bright future for Foster's and demonstrates what a prized business this is in the global beer industry, he told a briefing.

The former navy weapons engineer had previously defended the maker of Victoria Bitter, Carlton Draught and Pure Blonde from the hostile SABMiller bid by promising a return of cash to shareholders and looking to revive the brewer's earnings.

SABMiller shares ended off 1.6 percent at 21.85 pounds while Foster's shares closed at A$4.89 earlier on Wednesday before the deal was announced.

We consider the acquisition to be a good one, given the reasonable acquisition multiple, attractive fundamentals of the Australian beer market and the significant opportunity to improve operational performance within the Foster's business, said analyst Sam Hart at brokers Charles Stanley.

Analysts said the deal's value was at the higher end of recent beer transactions at 12.5 times current year forecast core EBITDA profits, but Foster's did have one of the highest profit margins in the beer world and, as one of the few big brewers still available to buy, had scarcity value.

I'm a bit surprised that the board has come back so quickly and approved a bid that looks to be only marginally higher, said fund manager Theo Maas, of Arnhem Investment Management in Sydney.

SABMiller says the deal is part of its strategy of creating an attractive global spread of businesses to add to its operations largely in the emerging markets of Africa, Latin America, Asia and Eastern Europe, which are leading the recovery in the beer market worldwide.

The London-based brewer of Peroni, Miller Lite and Grolsch launched its initial bid for Foster's at $9.5 billion, or A$4.90 a share, on June 21 and then went hostile by taking the offer direct to shareholders at the same price on Aug 17, but Foster's rejected both as being too low.

It has been long seen as the favorite to take over Foster's with other big brewing rivals saddled by high debts after recent deals such as the world No 1 Anheuser Busch InBev's costly $52 billion 2008 takeover of Anheuser Busch and world No 3 Heineken's purchase of Mexico's FEMSA Cerveza in 2010.

Foster's is seen as attractive with its high profit margins -- due to its virtually duopoly with Kirin-owned <2503.T> Lion Nathan -- although beer volumes have sagged recently with a poor summer and a consumer downturn, and analysts estimate SABMiller should be able to make A$140 million of annual costs savings.

The Foster's business which SABMiller is buying holds about half of Australia's beer market and little else, having retreated home from the global beer empire it once held and having split off its wine business earlier this year.

If Foster's agrees to higher rival bid within 12 months, it has agreed to pay SABMiller a break fee of A$99 million.

SABMiller is being advised by JP Morgan, RBS, Morgan Stanley and Moelis in the deal, while Foster's is advised by Goldman Sachs, Gresham and Allens Arthur Robinson.

(Additional reporting by Rebekah Kebede. Reporting by David Jones; Editing by Paul Sandle and Mike Nesbit)