By Andy Bruce and Ana Nicolaci da Costa

LONDON (Reuters) - Britain's economy picked up speed in the three months up to its vote to leave the European Union, data showed on Wednesday, helped by the biggest upturn in industrial production since 1999.

Sterling was little moved on the data and few in the financial markets expect the pace of growth will last into the second half of the year, with most economists saying the economy is at a high risk of recession after the country voted to leave the European Union.

Second-quarter gross domestic product beat expectations to grow by 0.6 percent, up from 0.4 percent in the first three months of the year, the Office for National Statistics said.

Output in the three months to June was 2.2 percent higher than a year earlier, the strongest annual growth in a year and exceeding a forecast for it to hold steady at 2.0 percent.

Much has been changed by the Brexit vote, however.

"The collapse in all surveys of activity and confidence undertaken since the referendum suggest GDP is on course to contract in Q3," Pantheon Macroeconomics' chief UK economist Samuel Tombs said.

Finance minister Philip Hammond said again after the data that the government had the tools to support the economy as it entered a "period of adjustment" as it prepared to leave the EU.

"Along with the Bank of England, this government will take whatever action is necessary," he said.

The improvement in economic growth in the second quarter reflected strong industrial output, services and construction in April, which largely dissipated in May and June.

That chimed with the view of the National Institute of Economic and Social Research that growth slowed markedly toward the end of the quarter.

A closely-watched business survey last week showed corporate activity contracted this month at the fastest pace since 2009, around the nadir of the global financial crisis.

A Reuters poll of economists last week suggested it was more likely than not that Britain will slide into recession in the coming year.

The Bank of England, which estimated second quarter growth would come in at around 0.5 percent, looks likely to cut interest rates for the first time since 2009 next week, although economists are divided about whether it will ramp up its quantitative easing program.

The BoE wrong-footed investors earlier this month by keeping rates on hold, although it held out the prospect of a stimulus package.

The ONS said the pick-up in growth was driven jointly by services and industrial production, the latter of which expanded 2.1 percent on the quarter - its best performance since 1999.

(Additional reporting by David Milliken Editing by Jeremy Gaunt)