LONDON — A deal worth over $100 billion to combine the world’s two biggest beer companies cleared its last major hurdle Wednesday when the shareholders of SABMiller approved the takeover by Budweiser maker Anheuser-Busch InBev.

SABMiller shareholders approved the $103 billion deal — dubbed Megabrew — despite opposition from some investors who saw their share of the payout shrink when the pound plunged following Britain’s vote to the leave the European Union. AB InBev shareholders also backed the transaction.

“We are committed to driving long-term growth and creating value for all our stakeholders,” Carlos Brito, CEO of AB InBev, said in a statement.

Regulators around the world have already approved the deal, which AB InBev says will create “the first truly global brewer.” The takeover is expected to be formally completed on Oct. 10, AB InBev said.

Acquiring SABMiller, which makes Fosters and Miller and traces its roots to the former South African Breweries, gives AB InBev a large presence in Africa while increasing its business in South America and Europe. The combined company will control almost a third of the global beer market.

The complicated deal was nearly derailed by the currency havoc caused by Britain’s vote to leave the EU.

In order to win approval from SABMiller’s two largest shareholders, AB InBev offered the U.S. tobacco company Altria and BevCo, an investment vehicle of the Santo Domingo family, a cash-and-stock deal that allows them to remain invested in the beer industry while avoiding taxes on a large cash payout. Other shareholders will receive a cash payment for their shares in British pounds.

The value of the cash offer declined in relation to the cash-and-stock deal as the pound weakened against the euro after the EU vote.

A group of smaller investors led by Aberdeen Asset Management opposed the deal, saying it undervalued SABMiller and left them at a disadvantage to Altria and BevCo, which together own about 40 percent of the company. In response, SABMiller agreed to recognize two classes of investors, with the deal requiring approval from 75 percent of smaller shareholders.

A British court must still approve the measure next week, but the hearing is largely considered uncontentious.

Aberdeen issued a statement expressing disappointment, but said it took comfort in securing a better deal for its clients — even though it argued the final price undervalued SABMiller.

“We take seriously our responsibilities as stewards of our clients’ capital and will continue to flag governance issues when appropriate with the companies we invest in,” it said. “AB InBev has acquired a great company at an attractive price and we hope that the combined business will prosper.”