Now playing: Watch this: Time to quit Yahoo? Site reportedly spied on emails for...

Justin Sullivan, Getty Images

Yahoo went searching for something in particular when it reportedly scanned all of its users' emails on the orders of a US intelligence agency -- but what?

Yahoo was scanning for the digital "signature" of a terrorist group with ties to a foreign government, according to a report Wednesday from The New York Times that cited an unnamed government official. The company adapted systems it already had in place to scan for spam, malicious software and child pornography, the report continued.

The reported email scans first came to light Tuesday when Reuters reported the company had created tools to scan all user email in response to a government directive. The story prompted privacy advocates to cry foul over Yahoo's apparent about-face on complying with government orders to hand over user data.

In 2007, Yahoo fought the legal authority behind the NSA's Prism data collection program, eventually losing its challenge. National security experts said that the government is likely to continue issuing such orders to protect the country now that so many emails and other communications are encrypted as they flow across the internet.

Yahoo declined to comment further on Wednesday about the email scanning reports. Earlier on Wednesday, the company issued a statement calling the Reuters report "misleading."

"We narrowly interpret every government request for user data to minimize disclosure," the statement continued. "The mail scanning described in the article does not exist on our systems."

According to the source cited by the Times, the scan ordered by the US government on Yahoo's systems is no longer taking place. The order might have come from either the NSA or the FBI, according to Reuters' sources.

The FBI declined to comment and the NSA did not respond to requests for comment.

Updated Oct. 6, 10:25 PT: Changed to show that the FBI declined to comment.