Yahoo denies building spying software to scan all of its customers’ incoming emails for U.S. intelligence agencies, a claim reported by Reuters Tuesday.

Citing people familiar with the matter, Reuters reported that Yahoo complied with a classified government directive to scan YahooMail accounts at the request of the National Security Agency or FBI. The software, which was built last year, spied on incoming emails of hundreds of millions of accounts, it said.

Yahoo described the article as misleading in a statement issued early Wednesday.  “We narrowly interpret every government request for user data to minimize disclosure,” it said. “The mail scanning described in the article does not exist on our systems.”

Related:

In a brief initial statement sent out on Tuesday Yahoo said that it is a law-abiding company that complies with the laws of the United States.

The Reuters report cited two unnamed former Yahoo employees and a third person who was apprised of the events.

It is unknown what intelligence officials were looking for, only that they wanted Yahoo to search for a set of characters, which could mean a phrase in an email, the sources said. It is also unknown what information, if any, was handed over, and if intelligence officials approached other email providers with similar requests

Following the report, the Office of the Director of National Intelligence said that it does not discuss specific techniques used  to collect foreign intelligence information. "It is important to remember the Intelligence Community has specific tools available to collect intelligence information, including the Foreign Intelligence and Surveillance Act," said ODNI Public Affairs Deputy Director Richard Kolko. "Collection under FISA is subject to rigorous oversight by all three branches of government. Under FISA, activity is narrowly focused on specific foreign intelligence targets and does not involve bulk collection or use generic key words or phrases. The United States only uses signals intelligence for national security purposes, and not for the purpose of indiscriminately reviewing the emails or phone calls of ordinary people.”

The National Security Agency and the FBI have not yet responded to a request for comment on this story from FoxNews.com.

This report comes on the heels of Yahoo’s announcement that "state-sponsored" hackers had gained access to 500 million customer accounts in 2014.

Fox News’ Matthew Dean contributed to this report.