The consensus of economists consulted by Reuters was for a 0.2 per cent monthly GDP reading.
“The meagre rise in GDP in June shows that the economy has little momentum heading into Q3,” said Samuel Tombs of Pantheon.
“We continue to expect quarter-on-quarter GDP growth to slow to a below-trend 0.3 per cent in Q3 and Q4.”
“The overall picture is of an economy performing moderately better than it did three months ago, but one struggling for any real momentum,” said Mike Jakeman of PwC.
The year-on-year June GDP growth rate dipped to 1.3 per cent from 1.5 per cent in May.
In June 2017 the economy was growing at an annual rate of 2.7 per cent.
Since the Brexit vote in 2016, the UK has slipped from being the fastest growing economy in the G7 to the slowest.
Nevertheless, the Bank of England, which raised interest rates last week, is likely to be comforted by the quarterly growth rate acceleration to 0.4 per cent, up from the 0.2 per cent in the first quarter, when activity was hit hard by the Beast from the East snowstorms.
The bank had argued that the GDP growth hit was temporary, whereas the ONS has pointed to signs of an underlying slowdown.
The ONS reported that services, which account for 80 per cent of total output, were flat in June.
Manufacturing grew by 0.4 per cent, down from 0.6 per cent in May.
Over the quarter, business investment grew by 0.5 per cent, bouncing back from the 0.4 per cent contraction in the first quarter. But the annual growth rate of 0.8 per cent was the weakest in a year and a half.
Business news: In pictures
Show all 13
The trade deficit widened, meaning that net trade was a considerable drag on overall GDP growth, having boosted it slightly in the first quarter.
Last month the ONS started producing a monthly UK GDP estimate as well as its quarterly updates on growth in order to give a more timely steer on the direction of the economy.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies