British spooks GCHQ nicked and stored the webcam images of millions of internet users not suspected of wrongdoing.
GCHQ files dating between 2008 and 2010 state that a surveillance program codenamed Optic Nerve collected still images of Yahoo webcam chats in bulk and saved them to agency databases.
According to the Guardian, webcam pictures, including substantial quantities of sexually explicit communications, from more than 1.8 million Yahoo user accounts were taken globally.
The information came from documents made public by the whistleblower Edward Snowden and Yahoo is incandescent with rage.
The company denied any prior knowledge of the programme, accusing the agencies of "a whole new level of violation of our users' privacy".
GCHQ wanted to keep the large store of sexually explicit imagery collected by Optic Nerve away from the eyes of its staff, probably to avoid it all being played doing the office Christmas party.
Optic Nerve was still active in 2012, according to an internal GCHQ wiki page accessed that year.
GCHQ wanted to use the pictures for experiments in automated facial recognition and to monitor GCHQ's existing targets, and to discover new targets of interest. Such searches could be used to try to find terror suspects or criminals making use of multiple, anonymous user IDs.
The program saved one image every five minutes from the users' feeds, partly to comply with human rights legislation, and to avoid overloading GCHQ's servers.
One document even likened the program's "bulk access to Yahoo webcam images/events" to a massive digital police mugbook of previously arrested individuals.
Bulk surveillance on Yahoo users was begun, the documents said, because "Yahoo webcam is known to be used by GCHQ targets".