(This July 10 story corrects third paragraph to show month-on-month economic growth was as expected, not stronger than forecast)

LONDON (Reuters) - Britain’s economy grew more than expected in the three months to May, helped by rebounding car output after Brexit-related shutdowns, but the outlook remains fragile as a new prime minister prepares to take Britain out of the European Union.

Output in the three months to May was 0.3% higher than in the previous three-month period, helped by an upward revision to growth in March and beating the consensus forecast in a Reuters poll of economists for growth of 0.1%.

The economy grew 0.3% in May alone after contracting by 0.4% in April, the Office for National Statistics said, as expected.

That deadline has now been pushed back to October, and both contenders to become prime minister have said they are prepared to take Britain out of the EU without a transition agreement if necessary, an alarming prospect for many employers.

Economists said Wednesday’s data did not mark an upturn in the fortunes of the world’s fifth-biggest economy. Growth remained lacklustre in the dominant services sector.

“While all of this is ultimately a temporary phenomenon, the underlying growth story doesn’t look a whole lot better,” ING economist James Smith said.

Slideshow ( 2 images )

Financial markets were little moved by the data. Samuel Tombs, an economist with Pantheon Macroeconomics, said the slowdown was not enough to warrant an interest rate cut by the Bank of England, something investors have increasingly put their money on in recent weeks.

Worried about global trade tensions as well as Brexit, the BoE forecast last month there would be zero growth during the three months to June after 0.5% growth in the first quarter. Business surveys last week showed the economy lost momentum in June and might have shrunk in the second quarter of 2019.

“All of this suggests that overall second-quarter growth will come in flat, or possibly slightly negative,” Smith said.

The outlook for the second half of 2019 is clouded not only by the growing threat of a no-deal Brexit, but also the trade tensions between the United States, China and the European Union. As a financial hub, Britain is highly exposed to the ebb and flow of the global economy.

The ONS said British economic output in the three months to May was 0.3% higher than it was in the previous three-month period, helped by an upward revision to growth in March and again beating the consensus forecast for growth of 0.1%.

Compared with a year earlier, growth in May alone stood at 1.5%, stronger than the median poll forecast for 1.3%.

Separate ONS figures showed Britain’s trade-in-goods deficit narrowed to 11.524 billion pounds from 12.761 billion pounds, a bigger decline than expected and helped by an improved trade balance with the EU. The goods trade deficit with the EU fell to its lowest since September 2014, the ONS said.