Yahoo's Sunnyvale headquarters. Photo via Yahoo's Flickr account

Last year, Yahoo secretly began sifting through every single one of its hundreds of millions of users' incoming emails for specific information at the request of the US government, Reuters reported Tuesday. This appeared to be the first time an internet company created a specific software program to search for a set of characters in all incoming emails.

Three different sources with knowledge of the situation told Reuters that, in 2015, the company's legal team received a classified directive from either the NSA or the FBI, asking the company to play ball. Yahoo CEO Marissa Mayer reportedly decided to go along with the directive. It's not yet clear what the government was looking for or who it was trying to target.

When asked to comment, Yahoo released a brief statement, saying, "Yahoo is a law abiding company, and complies with the laws of the United States."

Experts told Reuters that it's likely that the government sent the same directive to other big internet companies, although Yahoo is the only reported case as of now. Google and Microsoft did not respond to Reuters' requests to comment on the matter.

Read: How Scared Should I Be of Getting Hacked?