The FTSE 100 managed to start the new year on the front foot on Wednesday, ending in positive territory after being weighed down early on by disappointing economic data from China.
London’s top flight ended the day up 6.1 points, or 0.09%, at 6,734.23.
However, it spent most of the day in the red as investors were spooked by a further slowdown in the world’s second largest economy.
David Madden, analyst at CMC Markets, said: “The FTSE 100 has a relatively large exposure to commodity companies, so the worry that China is cooling has hit mining and energy stocks hard.
“China is a major importer of minerals and oil, and dealers are wary their appetite for commodities will fall further.”
Data out overnight showed the Caixin survey of Chinese manufacturing fell to 49.7, its first contraction since May 2017. A reading above 50 indicates growth, a reading below, contraction.
It comes amid simmering trade tensions between the US and China, adding to negative sentiment about the global economy.
Miners bore the brunt of the pain early in the day, with the likes of Anglo American and Glencore among the biggest fallers, shedding 37.4p to 1,710.4p and 8.85p to 282.5p by the close respectively.
But a late surge in oil prices saw Royal Dutch Shell and BP shares benefit, helping drag the FTSE 100 into calmer waters.
Also lending a helping hand were retailers following decent figures from John Lewis.
A surge in shoppers looking for last-minute gifts helped lift sales at department store chain over the festive period with sales up 4.5% in the week to December 29.
The retailer said it was boosted by shoppers buying last-minute Christmas presents, adding it experienced “very strong sales on Christmas Eve and a confident start to clearance sales both online and in shops”.
A bellwether for the sector, it helped catapult Next to the top of the FTSE 100. Shares in the clothing chain, which reports to the market on Thursday, ended the day up 186p, or 4.66%, at 4,177p.
Ocado was also up 20.6p to 810.6p by the close.
The pound, meanwhile, came under more selling pressure as Brexit fears once again came to the fore.
Sterling was down 1.2% versus the US dollar at 1.258. Against the euro it dropped 0.4% to 1.108.
It came as fresh data showed that British manufacturers are stockpiling goods at near record rates in preparation for a calamitous no-deal EU exit.
The Markit/CIPS UK manufacturing purchasing managers’ index (PMI) showed a reading of 54.2 last month, higher than the 53.6 recorded in November, and a six-month high.
But rather than being cause to celebrate, IHS Markit said the numbers reflect a build up of “safety stocks to mitigate potential Brexit disruption”.
In Europe, Germany’s DAX rose 0.18% while France’s CAC40 was down 0.8%.
A barrel of Brent crude was trading at 55 US dollars in a volatile session that saw it rebound from 52.5 US dollars amid oversupply fears.
The biggest risers on the FTSE 100 were Next up 186p at 4,177p, Fresnillo up 28p at 888p, Paddy Power Betfair up 180p at 6,580p and Wood Group up 13.4p at 519.6p.
The biggest fallers on the FTSE 100 were Glencore down 8.85p at 282.5p, Johnson Matthey down 76p at 2,723p, Informa down 16p at 614.2p and Rolls Royce down 20.6p at 809.4p.