Controversial Silicon Valley tycoon Peter Thiel has secured his largest contract to date with the British government for his secretive data mining company Palantir, after building a team of hundreds in the capital.

The Ministry of Defence has spent £26m on Palantir this year, marking the Silicon Valley company's most valuable public deal with the British government to date, The Telegraph can reveal.

It follows a doubling in staff numbers at the US company’s British office in Soho in the past two years to 434, according to the latest accounts filed at Companies House.

Palantir is hiring former civil servants and members of the military including Ash Alexander-Cooper OBE, a former Gurkha, helicopter pilot and colonel in the British special forces. Software engineers have been poached from Google, Microsoft and Amazon.

Palantir UK’s revenues rose by a third to £171m last year. The figure includes sales in the UK and across Europe.

Once regarded as Silicon Valley’s “worst kept billion dollar secret”, Mr Thiel and Palantir’s chief executive, Dr Alexander Karp, have kept an aura of mystery around the company. It now offers services to companies in a number of industries, from legal to law enforcement. On its website it refers to a product called Palantir Defence, which it describes a solution that "gives the warfighter immediate access to the latest critical information, removing the technical barriers to better data-driven decision making".