Irn-Bru maker AG Barr has seen its half year sales fizz higher despite a tumultuous time for soft drinks firms faced with the new sugar tax, a CO2 shortage and extreme weather.

The Scottish company reported a 4% rise in underlying pre-tax profits to £18.2 million for the six months to July 28 after sales lifted 5.5% to £129.8 million.

AG Barr, which also makes Rubicon and Tizer, said its "growth momentum has not been interrupted" in spite of headwinds hitting the sector and a "challenging and volatile marketplace".

Roger White, chief executive of the Cumbernauld-based company, said: "We have delivered a solid financial performance in the first half of the financial year, navigating through the soft drinks industry levy implementation, reformulation, extremes of weather and CO2 shortages in addition to a dynamic consumer, customer and macro-economic environment."

AG Barr revamped its Irn-Bru drink and other drinks ranges to reduce the sugar content ahead of the launch of the new UK soft drinks sugar tax in April.

But the group also had to contend with a market-wide shortage of CO2 at the height of the summer heatwave, when demand for fizzy drinks surged.

The shortage was caused by a raft of closures of factories producing the gas as a by-product of the fertiliser industry.

Factories normally close temporarily for maintenance in the summer, but this year too many plants across Europe shut at the same time, leaving CO2 supplies woefully short.

Added to this was a period of extreme weather, with the Beast from the East in early spring and the searing temperatures in June and July.

AG Barr said its share of the market by volume increased by around 15% as it continued to see a growing following for Irn-Bru outside of Scotland, particularly in England and Wales thanks to an ongoing marketing push.

The group stopped making the original full-sugar version in early January - but the move prompted a backlash among loyal Irn-Bru fans.

Its results showed on a bottom line basis, half-year pre-tax profits dropped to £18.2 million from £19.4 million a year earlier, when the result was boosted by a £2.5 million one-off gain.

Nicholas Hyett, equity analyst at Hargreaves Lansdown, said: "The sugar tax, a CO2 shortage and extreme weather have made the first half of the year a tumultuous one for the soft drinks industry.

"Against that background AG Barr's volume growth has outpaced the sector as investment behind the Irn-Bru, Rubicon and Strathmore brands delivers results."

He added the widened appeal of Irn-Bru was also a boost, saying: "The tonic made from girders may never have the same resonance in England and Wales as it does in Scotland, but given worries about the reduced sugar in the new recipe, progress is very reassuring."