Britain's trade deficit in May widened as exports declined in the run up to the country's Brexit vote.

The Office for National Statistics (ONS) said the deficit in goods and services widened to £2.3bn ($3bn, €2.7bn) from a downwardly revised £2bn pounds in April, an 11-month low.

However, analysts had forecast the deficit in May would come in at £2.9bn.

In May, the ONS said sales of goods to the EU, which accounts for almost half of British exports, fell 2.5%. Shipments to countries outside the European bloc plunged by 13%.

Month on month exports fell by £400m, driven by declines in both chemicals and machinery as well as large drops in the value of other exports.

The UK's June vote to leave the European Union has knocked consumer confidence and threatens business investment, but trade may pick up as the lower level of sterling could lead to higher demand for exports.

The pound has traded more than 10% lower than the dollar since the 23 June Brexit poll, although the impact of sterling's plunge will not be reflected in the trade figures for several months.

Capital Economics UK economist Paul Hollingsworth said: "The 10% or so fall in trade-weighted sterling since the referendum should help to boost exports in time.

"Although any improvement is likely to be slow against a background of fairly sluggish global growth and uncertainty about future trade relationships between the UK and other countries."

IHG Chief UK and European economist Howard Archer added: "With UK domestic demand likely to be pressurised substantially by prolonged, heightened uncertainties, following the vote to leave the European Union in the 23 June referendum, one hope has to be that the substantially weaker pound will feed through to boost export volumes.

"However, there is no guarantee that the markedly weakened pound will provide a major boost to UK exports. Furthermore, the UK's decision to leave the European Union will likely dampen European growth and could also very well have some global impact, which will hamper UK exports."