Despite the quarterly figures there were signs that growth on a monthly basis was slowing during the three-month period.

But the ONS said "very few" respondents had been affected by the uncertainty from the EU referendum vote on 23 June.

The production figures reflect the latest official growth figures for the whole economy which show strong GDP growth in April, followed by a sharp easing off in May and June.

Meanwhile in a separate report the ONS said the deficit on trade in goods and services was £5.1bn in June, compared with a £4.2bn the month before.

The UK exported £12bn worth of goods and services to the European Union in June, an increase of £500m compared with May.

High point?

Most of the growth in the quarter came in April when output rose by more than 2% on the previous month. By June the month on month increase had slowed to just 0.1%

Samuel Tombs, chief UK economist at Pantheon Macroeconomics, said: "The 2.1% quarter-on-quarter rise in production in the second quarter... mainly reflected the 2.3% month-to-month jump in production in April."

Some recent surveys have suggested the economy slowed sharply in the wake of the Brexit vote.

Lee Hopley, chief economist at EEF, the manufacturers' organisation, said: "Clearly, indicators of sentiment post referendum suggest that we've hit the high point for manufacturing this year.

"Amidst the wavering levels of confidence however we should take away some positive news, firstly that manufacturing entered this period of uncertainty from a relatively strong stance and the weaker exchange rate could yet bring benefits on the export side."

However, Mr Tombs said: "We fear that the trade boost could take even longer than usual to materialise this time, because exporters will be very reluctant to invest until the UK's future trade arrangements are known.