SAN FRANCISCO (KCBS) — Reuters is reporting that Yahoo last year secretly built a custom software program to search all of its customers’ incoming emails for specific information provided by U.S. intelligence officials.

People familiar with the matter say the company complied with a classified U.S. government directive, scanning hundreds of millions of Yahoo Mail accounts at the behest of the National Security Agency or FBI, the news agency reported.

Some surveillance experts said this represents the first case to surface of a U.S. Internet company agreeing to a spy agency’s demand by searching all arriving messages, as opposed to examining stored messages or scanning a small number of accounts in real time.

It is not known what information intelligence officials were looking for, only that they wanted Yahoo to search for a set of characters.

That could mean a phrase in an email or an attachment, said the sources, who did not want to be identified.

Reuters was unable to determine what data Yahoo may have handed over, if any, and if intelligence officials had approached other email providers besides Yahoo with this kind of request.

The NSA referred questions to the Office of the Director of National Intelligence, which declined to comment.

Google, creator of Gmail the world’s largest email service, said that it didn’t receive a spying request from the request from the U.S. government. If it had, Google said, its response would be, “No way.”

Microsoft, whose email service also is larger than Yahoo’s, also said it has “never engaged in the secret scanning of email traffic.” Twitter, which doesn’t provide email service but does allow users to exchange direct messages, likewise said it has never received such a request and would challenge it in court if it did.