Britain's economy grew by just 0.3% in the second quarter, confirming fears of a marked slowdown as the country prepares to exit the European Union.

The rate of growth over the previous quarter represents a slight improvement on the 0.2% expansion posted in the first three months of 2017. The official data matched the expectations of economists, but gave little cause for optimism.

"The economy has experienced a notable slowdown in the first half of this year," the Office of National Statistics said in a statement.

The retail and film production sectors showed signs of improvement, but weakness in construction and manufacturing weighed on activity.

Related: It's official. Business isn't investing in Britain.

A barrage of disappointing reports have sparked worries that Britain's already weak economy may be drifting toward recession. The U.K. recorded the slowest growth of any European economy in the first quarter of the year.

Brits are saving the smallest share of disposable income in over 50 years. Credit card borrowing is at record high. Wages are stagnating and consumer confidence is crashing.

Related: Is the U.K. headed for a recession?

Observers are watching closely to see if consumers and businesses grow more uneasy as Britain's divorce negotiations with the EU pick up speed.

Corporate leaders are most anxious about a scenario in which Britain crashes out of the EU without a deal. They would face new trade barriers and huge amounts of red tape. And in the event of an agreed exit, they are calling for lengthy transitional arrangements to allow firms to adjust.