Video caption Brexit has created "cloudy skies", says Zed Sheikh

The chancellor has told the BBC that he does not expect the UK to slide into recession after data showed the economy shrank by 0.2% between April and June.

Sajid Javid was speaking after the Office for National Statistics said the economy had contracted for the first time since 2012.

The surprise decline came after Brexit stockpiles were unwound and the car industry implemented shutdowns.

The pound sank after the data was released, raising fears of a recession.

Against the dollar sterling fell to $1.2025. Against the euro, it dropped throughout the day to €1.0736, a level not seen since the global financial crisis a decade ago.

Rob Kent-Smith, head of GDP at the ONS, said manufacturing output fell and the construction sector weakened.

A recession occurs when the economy contracts in two consecutive quarters. This is the first contraction since the fourth quarter of 2012.

Economists had not been forecasting a contraction in the economy in the second quarter, but had expected it to stagnate, with the consensus forecast for 0% growth.

Why is the economy shrinking?

The economy had shown 0.5% growth in the first quarter after manufacturers' stockpiling ahead of Brexit helped to boost output, when the manufacturing sector recorded its biggest quarter rise since the 1980s.

The ONS said GDP had been "particularly volatile" so far this year because of the changes to activity sparked by the original Brexit date of 29 March.

The statistics body said its latest figures showed that those increased stockpiles had been partly run down in the second quarter and that a number of car manufacturers had brought forward their annual shutdowns to April as part of contingency planning, which also hit growth.

Mr Kent-Smith said: "Manufacturing output fell back after a strong start to the year, with production brought forward ahead of the UK's original departure date from the EU."

He added that "the often-dominant service sector delivered virtually no growth at all".

What is the chancellor saying?

Mr Javid told the BBC: "I am not expecting a recession at all. And in fact, don't take my word for it. There's not a single leading forecaster out there that is expecting a recession, the independent Bank of England is not expecting a recession. And that's because they know that the fundamentals remain strong."

The Bank said earlier this month it expects the economy to grow by 1.3% this year , down from a previous projection of 1.5% in May.

Video caption The Chacellor Sajid Javid is not expecting a recession

Asked about the impact of Brexit, he said: "We saw some significant stockpiling by British businesses in anticipation of the Brexit that never was, and now they're using those stockpiles, they're coming down.

"Of course, there are businesses out there that are taking Brexit into account when they're making decisions."

He said: "No one will be surprised by today's figures."

What is happening to growth elsewhere?

The data comes at a time when there are signs other economies are slowing. For instance, data on Friday showed that French industrial output fell more than expected in June.

Mr Javid said: "This is a challenging period across the global economy, with growth slowing in many countries.

"But the fundamentals of the British economy are strong - wages are growing, employment is at a record high and we're forecast to grow faster than Germany, Italy and Japan this year."

But John McDonnell, the shadow chancellor, said the "dismal economic figures are a direct result of Tory incompetence".

"The Tories' Brexit bungling, including Boris Johnson now taking us towards no-deal, is breaking the economy."

The Liberal Democrats were also concerned about the impact of a no-deal Brexit.

"Pursuing a no-deal Brexit is a political choice without a mandate: these figures show people's jobs and livelihoods are being sacrificed at the altar of political extremism, " said Chuka Umunna, the party's Treasury and business spokesperson.

Mr Javid said the best way to deal with Brexit uncertainty was to leave the EU on 31 October, with or without a deal.

"We're seeing volatility in the figures and one of the best ways to actually end this volatility is to bring certainty around Brexit and make sure we leave on 31 October."

What does business say?

The employers' body, the CBI, said the contraction was "concerning".

Alpesh Paleja, CBI lead economist, said: "Growth has been pushed down by an unwind of stockpiling and car manufacturers shifting their seasonal shutdowns.

Image copyright Getty Images Image caption The winding down of Brexit stockpiling was partly to blame for the weak growth

"Nonetheless, it's clear from our business surveys that underlying momentum remains lukewarm, choked by a combination of slower global growth and Brexit uncertainty.

"As a result, business sentiment is dire."

The Federation of Small Businesses - which is calling for an emergency Budget - said that if the Treasury delays action until after 31 October, the date for Brexit, its efforts are likely to prove too little, too late.

"Time is of the essence. Unless the chancellor steps in imminently with radical action, we could be heading for a chaotic autumn - and a very long winter," said the FSB's policy and advocacy chairman, Martin McTague.

How have economists reacted?

Chris Williamson, chief business economist at IHS Markit, said the data showed "an economy in decline and skirting with recession as headwinds from slower global growth are exacerbated by a Brexit-related paralysis".

Geoffrey Yu of UBS Wealth Management said that while the global picture was "becoming more gloomy", anyone looking for positive signs for the economy could look to "robust private consumption, reflecting a healthy labour market".

Household spending rose 0.5% on the quarter. Samuel Tombs, chief UK economist at Pantheon Macroeconomics, agreed that household spending was still growing at a "robust rate" and said it was not time to panic.

He said the stockpiling was dragging on the economy, which was "sluggish and had not stalled".

What has happened to the pound?

The pound - which has been at two-year lows following Brexit uncertainty - fell after the data was released.

The currency also falls if there are expectations that interest rates will be cut. Mr Tombs said the market now sees a 70% chance of an interest rate cut in January, when Mark Carney is due to leave as the Bank of England's governor.