The UK economy grew by 0.2% in the second quarter of the year as it showed a surprisingly good performance in June.
Data from the Office for National Statistics showed that gross domestic product rose by 0.5% in June, helped by the manufacturing sector.
Economists had expected GDP to grow by 0.2% in June and 0.0% in the quarter as a whole. It grew by 0.1% in the first quarter of the year.
ONS director of economic statistics Darren Morgan said: "The economy bounced back from the effects of May's extra bank holiday to record strong growth in June. Manufacturing saw a particularly strong month with both cars and the often-erratic pharmaceutical industry seeing particularly buoyant growth.
"Services also had a strong month with publishing and car sales and legal services all doing well, though this was partially offset by falls in health, which was hit by further strike action.
"Construction also grew strongly, as did pubs and restaurants, with both aided by the hot weather."
It is "very difficult" to achieve higher levels of growth when "you are dealing with inflation pressures", a Treasury minister has said.
Asked about the latest GDP data on Sky News, John Glen said, "I think what it shows is there's a lot of resilience in the UK economy. We saw a record upgrade from the IMF (International Monetary Fund) of 0.7% higher for the UK economy this year. That's welcome news. When I started in office nine-and-a-half months ago, recession was predicted.
"But of course, you know, I would like that figure to be higher, but we are in the middle of the pack with respect to our peers in the G7.
"Germany's is actually flat, Italy's minus 0.3%. So, we've got a lot of work to do, but also in the context of the inflation pressures we see in the economy at the moment, it's obviously a delicate balancing act because we want to deal with that inflation, which is a massive impact for business confidence and for households as we know, and obviously it's very difficult to achieve higher levels of growth when you're dealing with inflation pressures."
Asked about the Prime Minister's pledge to grow the economy by the end of the year, the Chief Secretary to the Treasury said: "We had the highest growth last year in the G7 and we are predicted in 2025 to get back up to that level.
"But you won't expect me to commentate on the outcome of something that will take all year: we are at half-time."