The Israeli military uploaded 3.5m photos to Amazon’s cloud platform in order to use the US company’s facial recognition technology to analyse images of Palestinians, the Guardian can reveal.

Israel has long used facial recognition technology, particularly in its occupation of the West Bank.

The military also deployed facial recognition technology to identify people it suspected were militants.

Sources familiar with its work said the images were routinely used for facial recognition programmes.

Facial recognition was then used to match people to images held in Rolling Stone’s systems, sources said.