LONDON (Reuters) - British manufacturing output fell in July at the fastest pace in a year, confirming earlier signs that factories took an immediate hit after the vote to leave the European Union, official data showed on Wednesday.

A man works on an electrical component on the factory floor of PP Control and Automation near Cannock, Britain, July 6, 2016. REUTERS/Phil Noble

Overall industrial output unexpectedly rose thanks to strong oil and gas production, boosting the chances that Britain’s economy, while slowing, will avoid a recession.

But sterling slipped after the figures which the Bank of England will see as consistent with its view that the economy is likely to slow sharply in the second half of 2016. BoE Governor Mark Carney is due to speak to lawmakers at 1315 GMT.

Manufacturing output fell by a sharper-than-expected 0.9 percent in July following a 0.2 percent drop in June, the Office for National Statistics said.

The official figures are the first to cover economic output solely for the period after the June 23 Brexit vote. Britain was plunged into political chaos in July by the referendum result before Theresa May took over as prime minister.

“We maintain our view that UK industrial production and manufacturing remain a cause for concern,” said economists Andrzej Szczepaniak and Fabrice Montagne at Barclays.

A deep-seated lack of competitiveness in British manufacturing would be aggravated by doubts about the country’s future trading ties if the government delays starting the formal process of leaving the EU, they said.

May has said she will not start the process this year to give Britain time to prepare its exit strategy but she has also said it would not be “kicked into the long grass.”

Data released earlier on Wednesday showed German industrial output posted its steepest fall in 23 months in July. Economists said the German figures probably reflected concerns about the consequences of Britain’s decision to leave the EU.

Despite the hit in July, there have been signs of a rebound in Britain’s economy. A closely watched survey by financial data company Markit, published earlier this month, suggested manufacturing, which makes up about 10 percent of the economy, jumped in August. There was a similar result in a survey of the dominant services sector.

The ONS said on Wednesday that overall industrial output in July unexpectedly rose 0.1 percent on the month after stagnating in June, helped by oil and gas. Economists polled by Reuters had expected it to edge down 0.2 percent.

Oil production was boosted by continued output at the Buzzard field in the North Sea which usually shuts down for maintenance in July but which will occur in September this year.

Pharmaceuticals, which are often volatile, represented the main drag on manufacturing, but many other sectors fell too.

The ONS said there was no sign of manufacturers getting an immediate boost from sterling’s plunge since the Brexit vote as contracts are usually slow to respond to currency fluctuations.

Other private sector surveys have suggested manufacturers have benefited the pound’s plunge since June which has boosted export orders. However, there are also signs that import costs are rising fast - something that will squeeze profit margins, boost inflation and eat into spending power of consumers.