The British spy agency GCHQ, aided by systems provided by the National Security Agency, collected still images of Yahoo webcam chats in bulk and saved them to its databases, regardless of whether the users were intelligence targets, according to a report in the Guardian on Thursday.

The program was code-named Optic Nerve, according to documents obtained by the British newspaper from former NSA contractor Edward Snowden.

Between 2008 and 2010, and in one six-month period in 2008, the agency collected webcam images, “including substantial quantities of sexually explicit communications,” from more than 1.8 million Yahoo user accounts globally, the paper reported.

The Guardian reported that Britain has no restrictions to prevent Americans’ images from being accessed by GCHQ analysts without an individual warrant.

Yahoo, an American multinational company based in Sunnyvale, Calif., said it was not aware of the activity, nor would it condone it. “This report, if true, represents a whole new level of violation of our users’ privacy that is completely unacceptable,” a Yahoo representative said in an e-mail.

The paper reported that the documents “chronicle GCHQ’s sustained struggle to keep the large store of sexually explicit imagery collected by Optic Nerve away from the eyes of its staff, though there is little discussion about the privacy implications of storing this material in the first place.”

Yahoo’s statement said the Silicon Valley firm “strongly call[s] on the world’s governments to reform surveillance law” consistent with the principles outlined in December by U.S. tech firms.

But Christopher Soghoian, principal technologist with the American Civil Liberties Union, said, “Yahoo deserves the majority of the blame here” for not shielding customers’ privacy. “The technology to protect your users doesn’t require some kind of Manhattan Project,” he said. “It’s just sitting there. Anyone can use it.”

Craig Timberg contributed to this report.