BP estimates that Palantir, led by Alex Karp, has helped to increase its North Sea oil production by 10%

A fall in the oil price was the last thing Bob Dudley needed. It was 2014, BP was still clawing its way out of a $60bn financial hole created by the Deepwater Horizon disaster, and crude was set to plunge from $100 (£78) a barrel to the mid-$30s.

The chief executive knew his company needed to become leaner, more efficient and more profitable. He turned to an unusual ally: Alex Karp, the billionaire co-founder of Palantir, the secretive CIA-funded data analytics business.

The Silicon Valley outfit, chaired by co-founder Peter Thiel, had made its name working with three-letter government agencies — including the MoD. Its software combed through mountains of data to provide intelligence for planning attacks, co-ordinating disaster relief and finding “bad guys”.

The