The Office for National Statistics said the economy grew 0.4% in the three months to the end of June, as was widely expected, up from 0.2% in the first quarter.
In June alone, the economy gained 0.1% after a 0.3% rise in May. Annual growth picked up slightly to 1.3%.
ONS statistician Rob Kent-Smith said: “The economy picked up a little in the second quarter with both retail sales and construction helped by the good weather and rebounding from the effects of the snow earlier in the year.
“However, manufacturing continued to fall back from its high point at the end of last year and underlying growth remained modest by historical standards.
“The UK’s trade deficit noticeably worsened as exports of cars and planes declined sharply while imports rose.”
The Bank of England is likely to be relieved that the economy has recovered, as it had predicted, and its decision to raise interest rates above their crisis lows for the first time in nearly a decade has been vindicated.
Sterling edged up slightly versus the dollar following the data, but was still trading 0.5% down at 1.27. Against the euro, the pound was up 0.1% at 1.11.
Ranko Berich, head of market analysis at Monex Europe, said: “There is not that much to be excited about in today’s UK GDP (Gross Domestic Product) figures, which come as sterling has reached a 13 month low against the US dollar.
“Today’s release shows the economy has weak momentum heading into Q3. Growth is less anaemic than in the first quarter, but the manufacturing sector is struggling and net trade proved a significant drag as exports flagged.
“Although higher investment did partly make up for weakening consumer spending, it is unclear if this can continue to be the case in the second half of the year.
“On the whole, downside risks to the economy are clearly mounting. Transient factors may have boosted GDP in Q2, as consumers opened their wallets after a slow first quarter, encouraged by warm weather and the World Cup.”
Mr Berich believes concerns about a possible no-deal Brexit would continue to weigh on the pound.
“Today’s figures suggest strong growth will not support the pound amid rising political risks, as it did the immediate aftermath of the EU referendum,” he said.
The service sector, which represents about 80% of the economy, grew 0.5% in the second quarter – its strongest expansion since the end of 2016.
Quarterly growth in household spending rose 0.3% from 0.2% in the first quarter, but still below last year’s quarterly average of 1.1% – the weakest annual increase since early 2012.