For the first time in a long time, a Budweiser looks more appealing than a Heineken.

The world’s biggest beer company, Anheuser-Busch InBev, released unexpectedly strong third-quarter results on Thursday. The Bud brewer sold 3.4% more beer in the three months through September compared to the same time last year and it was the seventh consecutive quarter when sales were above analyst expectations, according to FactSet. AB InBev also increased the lower end of its 2021 profit guidance despite higher bills for commodities and...

For the first time in a long time, a Budweiser looks more appealing than a Heineken.

The world’s biggest beer company, Anheuser-Busch InBev, released unexpectedly strong third-quarter results on Thursday. The Bud brewer sold 3.4% more beer in the three months through September compared to the same time last year and it was the seventh consecutive quarter when sales were above analyst expectations, according to FactSet. AB InBev also increased the lower end of its 2021 profit guidance despite higher bills for commodities and transport.

The company’s shares were up 8% in early European trading and got another boost in the U.S. morning when cigarette giant and major shareholder Altria confirmed it has no plans to sell its stake even now that a five-year lockup on the restricted shares it owns has expired.

A global business helped the brewer to compensate for hiccups in individual markets. AB InBev sold 4.8% less beer in North America in the third quarter, partly because supply-chain difficulties meant its products were out of stock in certain outlets. Its Asia division was also weak as parts of China were put under fresh lockdowns to control a Covid-19 outbreak. But this was more than offset by strong demand in countries like Brazil, Columbia and South Africa.

A push into more expensive beer also helped to protect profits from higher input costs. The company now makes 30% of total revenue from higher-margin premium brands, up from 24% in 2017. Heavy investment in e-commerce is helping: Big consumer goods companies like AB InBev can promote more premium products on their websites.

The brewer outshone its nearest stock-market rival Heineken, which this week reported a 5.1% decline in the amount of beer sold over the same period. Some of the differences can be explained by their respective footprints, but not all. AB InBev’s sales were well ahead of its competitor in Brazil where they both have big businesses, for instance.

AB InBev’s depressed share price should benefit if it can continue with this sharper performance. As a multiple of projected earnings, the stock hasn’t traded at a premium to Heineken since 2018, when investors began to worry about the high levels of debt the company took on to buy SABMiller. High borrowings still make it hard for AB InBev to regain its pre-2018 valuation edge. But on sales growth, Budweiser has the better recipe for now.

Write to Carol Ryan at carol.ryan@wsj.com