The UK economy looks on course to avoid tipping into recession before it is due to leave the European Union, despite a small fall in output in August, official figures showed today. 

Gross domestic product in the three months to August was 0.3% higher than in the previous three-month period, after growing by an upwardly revised 0.1% in the three months to July, the Office for National Statistics said.

The ONS figures were better than all forecasts in a Reuters poll of economists.

However output in August alone dropped by 0.1% on the month versus economists' average forecast for it to hold steady, after growth in July was revised up to 0.4%. 

Britain's economy shrank in the second quarter of the year when businesses found themselves holding unnecessary stockpiles of raw materials after Britain's departure from the European Union was delayed from the original date of March 29. 

Two consecutive quarters of contraction would mean Britain's economy met a commonly used definition of recession.

But the ONS said that the economy would need to shrink by an unusually large 1.5% in September alone for this to happen. 

As well as Brexit, manufacturers across Europe have been hit by a rise in trade tensions between the US and China which has weighed on growth globally. 

The new managing director of the International Monetary Fund, Kristalina Georgieva, warned earlier this week that the world economy was suffering a "synchronised slowdown". 

Prime Minister Boris Johnson has promised to take Britain out of the EU by the end of this month, without a transition period if necessary - despite parliament telling him to delay Brexit again if he cannot negotiate a fresh deal. 

Businesses say a no-deal Brexit risks causing major disruption to imports.

The Bank of England predicted last month that the economy would manage growth of 0.2% in the third quarter, bolstered in part by higher public spending.

But September IHS Markit purchasing managers' index data released last week for the private sector pointed to a 0.1% contraction in the third quarter. 

The ONS data showed annual GDP growth slowed to 1.1% from 1.3%, less of a fall than the drop to 0.9% which economists had forecast.

"Growth increased in the last three months, despite a weak performance across manufacturing, with TV and film production helping to boost the services sector," ONS statistician Rob Kent-Smith said.

Soft global demand was hurting demand for manufactured exports, the ONS added, and growth in the dominant services industry slowed to zero in the month of August alone.

August trade data also released today showed that Britain's goods trade deficit widened slightly to £9.8 billion from £9.6 billion in July, compared to poll forecasts of £10 billion. 

Britain's total trade deficit for goods and services narrowed slightly to £1.5 billion from £1.7 billion.