Ending a nearly four-month-long impasse, PepsiCo Inc. (PEP) announced a sweetened $7.8 billion deal to buy its two largest bottlers in a push to revive its North American beverage business that has been fighting a slump in sales.

PepsiCo sweetened its April offer considerably, saying it will pay $36.50 in cash and stock for the each share of Pepsi Bottling Group Inc. (PBG) it doesn't already own, well above its original bid of $29.50 a share. The cash and stock price for PepsiAmericas Inc. (PAS) was raised to $28.50 a share from $23.27 a share.

Shares of the beverage and snacks giant and the bottlers' stocks surged on the news. Since the first announcement of the bid in April, there have been few indications from any of the three companies on whether the deals would finally go through and at what price. Tuesday's announcement removed the uncertainty that PepsiCo investors had been facing and the sweetened prices for the bottlers were roughly in the range of what several analysts had predicted. PepsiCo also said the deal would give it annual pretax savings, or synergies, of $300 million by 2012, higher that its original forecast. Still, investors and analysts said that PepsiCo might be able to wring out even more savings than its latest estimate.

"I'm glad its done," said Walter Todd, a portfolio manager of Greenwood Capital, which holds PepsiCo shares. "I think PepsiCo is lowballing the synergies." PepsiCo shares were recently up 5.4% to $59.23.

PepsiCo had widely been expected to sweeten its bid, but investors were uncertain about how high the beverage maker would go and couldn't discount the possibility that PepsiCo could walk away from the deal. In recent months amid that uncertainty, shares of both bottlers traded well above the price of Pepsi's original bid but didn't hit the levels that analysts predicted. Shares of both bottlers rose further on Tuesday coming in line with PepsiCo's announced deal price. Pepsi Bottling's stock was recently up 8.3% to $36.40, and shares of Pepsi Americas gained 8.7% to $28.42.

"The price is in line with our expectations... We think getting the deal done removes a big overhang on PepsiCo," said JPMorgan analyst John Faucher in a research brief.

The deal will allow PepsiCo to control 80% of its North American beverage distribution, a move the company has said would allow it to cut costs as the region's soda sales have been stagnating.

Pepsi's move marks a reversal of the steps that the company took a decade ago to separate its bottling operations. In 1999, the company went through an initial public offering for a roughly 60% stake in Pepsi Bottling.

That spinoff was intended to placate investors and to rid PepsiCo of a low-margin and capital-intensive business. Bottlers, which are heavy users of commodities like aluminum and are responsible for transporting the drinks, tend to have much narrower margins than Coke and Pepsi, which sell the soft drink concentrate and market the brands.

But in the last decade, the U.S. beverage industry has changed dramatically, with non-carbonated drinks growing and sales of fizzy sodas falling. The recession has put added pressure on sales of non-alcoholic drinks. Some of the key noncarbonated drinks aren't distributed by the bottling system.

Pepsi's own business has evolved over the last decade, with the company acquiring non-carbonated brands like Gatorade and Tropicana, both of which aren't for the most part currently distributed through the bottling system.

Pepsi's own earnings have reflected pressures in North America. In the recent second quarter, PepsiCo's revenue came in lighter than analysts' forecasts as the company's North American beverages business was weak. A primary sore spot for PepsiCo is Gatorade, whose new marketing campaign for the sports drink hasn't stopped falling sales. Total beverage volume in the Americas for PepsiCo fell 6% in the second quarter.

Pepsi argues that with the changes in market trends, it needs to be more nimble in being able to use bottler and other distribution systems as needed. Owning the bottlers will allow for quicker distribution of new products and speedier decision making, it says. Controlling its own distribution network could help cut costs in some areas. Bottled water, for instance, has been another area where the beverage company has faced thin profit margins as private label has gained share and retailers have put pressure for more promotions.

The last few months have reinforced the rationale for the deal, said Chief Executive Indra Nooyi in a conference call with investors. "With the retail environment getting increasingly concentrated and difficult, this will give us a strategic advantage," she said. Even before its bid, PepsiCo owned 33% stake in Pepsi Bottling and a 43% stake in PepsiAmericas.

PepsiCo. rival Coca-Cola Co. (KO) has so far publicly maintained that it likes the local approach of its existing bottling system in the U.S. A Coke spokesman didn't comment and its largest bottler Coca-Cola Enterprises Inc. (CCE) was recently up 1.9% to 19.39.

-By Anjali Cordeiro, Dow Jones Newswires; 212-416-2200; anjali.cordeiro@dowjones.com

(Kevin Kingsbury contributed to this article.)