People walk through the Canary Wharf financial district of London, Britain, December 7, 2018. REUTERS/Simon Dawson/File Photo.

Britain’s economy shrank for the first time since 2012 in the second quarter, a severe hangover from a pre-Brexit stockpiling boost and one that bodes poorly as Prime Minister Boris Johnson gears up to leave the EU in October.

Sterling slid to a new 31-month low against the dollar after data showed output in the world’s fifth-largest economy fell by 0.2% in the three months to June compared with the previous quarter, below all forecasts in a Reuters poll of economists that had pointed to a flat reading.

With Johnson’s government committed to leaving the European Union on Oct. 31, regardless of whether he can secure a transition deal to avoid trade disruption, the outlook for the remainder of 2019 is uncertain.

The world economy has also slowed due to the trade conflict between the United States and China.

Year-on-year economic growth slid to 1.2% from 1.8% in the first quarter, Britain’s Office for National Statistics said, its weakest since the start of 2018.

“There is … little doubt that the economy is stalling, regardless of the volatility in the data,” PwC senior economist Mike Jakeman said.

He said the Brexit crisis and the uncertain global outlook left Britain’s economy on a “knife-edge” for the third quarter.

Chancellor Sajid Javid told the BBC he was not expecting a recession “at all”. He added that the figures – which none of the 51 economists polled by Reuters predicted – “were not a surprise in any way”.

Annual growth in June alone was the weakest since August 2013 at 1.0%.

Nonetheless, most economists expect some improvement in the third quarter – which would avoid Britain meeting the technical definition of a recession, which is two consecutive quarters of negative growth.

“Consumers have cash in their pockets – wage growth is at an 11-year high (and) surveys point to further increases in employment,” Pantheon Macroeconomics’s Samuel Tombs said.

“In addition, growth in government spending should retain its current momentum, given the new government’s zeal for fiscal loosening,” he added.

Javid said late on Thursday (Aug. 8) that he would set out spending plans for next year in September.

Britain’s economy has slowed since June 2016’s vote to leave the EU, with annual growth rates dropping from more than 2% before the referendum to expand by 1.4% last year.

Friday’s data showed business investment contracted 0.5% in the second quarter of the year versus economists’ expectations of a 0.3% fall.

Household spending, which has been much more resilient than business investment, due to falling unemployment and rising wages, rose 0.5% on the quarter.

Trade figures and its contribution to GDP were distorted erratic flows of non-monetary gold and also showed the effect of businesses building up fewer stocks than in the first quarter of the year when they were readying for Brexit.