Updated

The National Security Agency is operating a massive database system that allows analysts to scour individuals' emails, chats and Internet browsing histories at will, according to a new report from The Guardian based on leaked documents.

The article was quickly challenged by the NSA. In a statement forwarded to Fox News, the agency said "allegations of widespread, unchecked analyst access to NSA collection data are simply not true."

The agency acknowledged the existence of the program -- called XKeyscore -- but said access is limited and suggested it was mainly aimed at foreign intelligence targets.

The Guardian article described it differently. According to the piece, the XKeyscore program is the "widest-reaching" system the agency has and allows analysts without prior authorization to dig around the database by filling out an on-screen form giving a basic justification.

According to the report, the program covers "nearly everything a typical user does on the internet" including emails and websites visited. It also reportedly allows analysts to intercept Internet activity in "real time."

More On This...

    The Guardian report seems to make a distinction between what is technically possible under this program and what is legally allowed. It notes that U.S. law requires the NSA to get a warrant if the target is a U.S. individual -- but says the XKeyscore program provides "the technological capability, if not the legal authority" to go after Americans without a warrant as long as an analyst knows information like an email or IP address.

    The NSA, in its statement, pushed back on these assertions.

    "The implication that NSA's collection is arbitrary and unconstrained is false," the agency said. "NSA's activities are focused and specifically deployed against -- and only against -- legitimate foreign intelligence targets in response to requirements that our leaders need for information necessary to protect our nation and its interests."

    The agency said those with access to the system are trained on their "ethical and legal obligations." The agency complained that the ongoing leaks continue to jeopardize security.

    The statement said the programs as a whole have helped defend the nation, and that as of 2008, "there were over 300 terrorists captured using intelligence generated from XKEYSCORE."

    The report was based on documents by NSA leaker Edward Snowden, who continues to evade capture by the U.S.

    Journalist Glenn Greenwald, who wrote the Guardian article, had claimed over the weekend that he had evidence to back up Snowden's past claims that low-level workers and other officials could tap into almost anyone's communications.

    The report comes after several intelligence officials testified Wednesday on Capitol Hill about the surveillance programs, defending them as vital to national security.

    President Obama also told Democratic lawmakers on Wednesday that he's open to some changes in NSA programs, according to those present at the meeting.

    Meanwhile, the Office of the Director of National Intelligence declassified a set of documents on Wednesday that begin to shed light on the authorization and rules behind the agency's phone and Internet record collection.

    The documents stress that these programs allow the government to collect basic information about phone calls and email communications, but not the content of those messages. They say most of the information "is never reviewed," while describing the programs as vital to the "early warning system" for detecting terror plots.