UK goods exports hit a record monthly high of £26.9 billion in June as sales to countries outside the European Union rose, enabling a narrowing of the trade deficit to its smallest for nearly a year, official trade figures have revealed.

The seasonally-adjusted data, published yesterday by the Office for National Statistics, showed that the UK's deficit in goods trade with the rest of the world declined from £8.67 billion in May to £8.08bn in June.

The June figure was significantly better than the £8.5bn deficit which had been forecast by the City, and was the narrowest goods trade gap since July 2012.

Goods exports in June were up nearly £1.3bn, or 4.9%, on May's total.

The trade figures boosted hopes for the UK economic outlook. UK gross domestic product (GDP), even after a 0.6% rise in the second quarter, was still 3.3% adrift of its peak ahead of the onset of the Great Recession more than five years ago.

Tom Vosa, economist at Clydesdale Bank owner National Australia Bank, said of the trade figures release: "What it really confirms is that we are unlikely to see any downward revisions to the 0.6% Q2 GDP (estimate).

"We knew when it was made that the ONS had some quite punchy assumptions for activity in June and so far these seem to have been met, suggesting that net trade will possibly contribute positively to GDP in the second quarter."

The ONS noted that the £78.4bn figure for UK goods exports in the second quarter, up from £74.7bn in the opening three months of this year, was also a record high.

UK goods imports in June totalled £35bn, up 2% from £34.4bn in May.

The ONS noted exports of goods to countries outside the European Union in June totalled £14.2 billion, up £1.3bn on the May figure. UK goods exports to the US in June were up by £362m on May. There was a similar month-on-month rise in exports to South Korea, the ONS figures showed.

David Kern, chief economist at the British Chambers of Commerce, said: "The large fall in Britain's trade deficit is yet more positive news for the economy, with longer-term comparisons signalling an improvement in the UK's trading performance.

"Britain's exporters are now starting to focus more on trade with countries outside the EU. This is particularly encouraging, as these countries are growing at a faster rate and will be the ones that provide the greatest opportunities for UK firms."

However, he added: "Despite these improvements, our trade deficit is still too large and we aren't making enough progress in rebalancing our economy towards net exports."

Including trade in services as well as goods, the UK's trade deficit with the rest of the world narrowed from £2.61bn in May to £1.55bn in June.

Scottish manufactured export volumes jumped by 2.5% quarter-on-quarter in the opening three months of this year, as the food and drink industry enjoyed success in overseas market-places, figures published late last month by the Scottish Government showed.

This 2.5% advance was achieved in spite of a 12.2% quarter-on-quarter fall in exports in the electrical and instrument engineering sub-sector, which includes the key electronics industry, and an 11.2% drop in overseas sales in the transport equipment category.

Scottish manufactured exports, even though they were up sharply in the first quarter, were 1.4% lower in the year to March 31 than in the preceding 12 months, the Scottish Government figures showed.

Separate figures published yesterday by the Office for National Statistics showed that UK construction output rose by a seasonally-adjusted 1.4% quarter-on-quarter in the three months to June. The ONS last month estimated second-quarter growth in construction output at 0.9%, when it published its preliminary GDP figures.