The UK's economy expanded by 0.4% in July, surpassing economists' predictions of no growth, according to the Office for National Statistics (ONS). This unexpected expansion was significantly bolstered by a robust performance in the services sector, with computer programming and businesses utilizing artificial intelligence (AI) playing a notable role.

The growth figure for July follows a period of slower expansion, with the economy growing by 0.3% in June and remaining flat in May. The ONS highlighted that the positive trend in AI-related technologies appeared to contribute to growth not only in July but also in the preceding months.

Additional factors cited by some businesses for July's activity included warm weather and the FIFA World Cup, though their impact varied across different industries. The ONS director of economic statistics, Liz McKeown, noted that while these elements influenced activity, their effects were not uniform.

In the three months leading up to July, which provides a broader view of underlying economic trends, the UK economy grew by 0.4% compared to the previous three-month period. Chancellor John Healey described the economy as "demonstrating a welcome resilience" amidst global uncertainty, adding that the UK's growth in the first half of the year was the fastest among G7 nations, though he acknowledged it remained fragile.

Despite the positive July figures, experts anticipate a slowdown in growth in the coming months. Concerns linger about the impact of high energy prices on households and the ongoing effects of the conflict in the Middle East, which influences everything from the cost of groceries to government borrowing expenses. Healey is set to present his first Budget in October and has emphasized a desire for public confidence in the economy, despite acknowledging high borrowing costs.

Paul Dales, chief UK economist at Capital Economics, observed that July's data indicated the economy's resilience seen in the first half of the year persisted. However, he cautioned that escalating energy and borrowing costs are likely to dampen future growth, particularly if current price increases are sustained.

The Bank of England is scheduled to announce its next decision on interest rates imminently, with economists widely expecting rates to be held steady, although some predict a potential hike later in the year. Yael Selfin, chief economist at KPMG, pointed out that the headline growth figure masks a less positive picture for households, with consumer-facing services like retail and hospitality experiencing contractions.

Richard Carter, head of fixed interest research at Quilter Cheviot, suggested that sustained growth might be difficult to achieve, especially with economic activity potentially slowing ahead of the Budget. He also reiterated that the war in the Middle East continues to be a significant driver of economic data, with the UK appearing particularly exposed to its consequences.