WASHINGTON (AP) -- The intelligence community's top lawyer on Tuesday defended the surveillance violations by staff of the National Security Agency by comparing programs that collect mass amounts of information on Americans to problems with the troubled health care website.

"Complicated technology systems frequently don't work as they expect them to," Robert Litt, general counsel for the Director of National Intelligence, told a conference at the Georgetown University Law Center. "Using the word 'abuse' in the context of the operation of the surveillance program is a little bit like saying the Department of Health and Human Services is abusing people because of the fact that the Obamacare websites don't work properly. They are complicated."

In 2011, after the government disclosed what it said were technical problems with its computer systems, a court found the NSA had violated the Constitution for three years. Litt's statement on Tuesday could be read as significantly downplaying the constitutional violations cited by the court or as highlighting the politically sensitive problems with the health care website.

The Obama administration on Monday declassified another round of secret documents, showing that the NSA has made serious mistakes in collecting American communications records. The documents also show that agency reported those errors and took action to prevent future missteps.

According to court records released by Director of National Intelligence James Clapper Monday, the NSA admitted to gathering material improperly — in one case because of a typographical error, and in another case because of "poor management, lack of involvement by compliance officials and lack of internal verification procedures, not by bad faith."

The Obama administration published the heavily censored files as part of ongoing civil liberties lawsuits challenging the constitutionality of the government's collection of U.S. communications records, which the White House has said is a crucial tool to track terrorists.

Story continues

The latest release — with much of the documents heavily blacked out — reflects the administration's strenuous efforts to maintain its legal authority to collect Americans' phone records and some email data amid opposition on Capitol Hill. The administration has been under pressure to reveal more details about NSA operations since former NSA systems analyst Edward Snowden leaked top-secret documents detailing the agency's collection of millions of U.S. communications records.

In one of the newly released documents, the secret intelligence court judge, U.S. District Judge John D. Bates, expressed dismay in 2009 over the continuing errors after the government had repeatedly said it would fix the problems. "Those responsible for conducting oversight at the NSA had failed to do so effectively," Bates said, calling that the most charitable conclusion he could come to.

Litt said Tuesday the NSA had taken multiple steps since those documents were produced, including appointing a compliance officer and hiring a 300-person team to oversee operations — which he said has helped address the frequent "disconnect" between NSA operators and lawyers in the early days of the program, such that those doing the searching didn't always know the rules. He pointed out that NSA is now hiring a privacy officer who will further monitor whether Americans' civil liberties are being protected.

Similar documents about the U.S. collecting phone records were previously declassified and published in response to a lawsuit filed by the Electronic Frontier Foundation, and the Obama administration has revealed others to persuade Congress to allow it to continue collecting the phone records.

After the NSA began the bulk collection program in 2006, one NSA inspector general's report said rules already in place were "adequate" and "in several aspects exceed the terms" of what the Foreign Intelligence Surveillance Court had required. But it recommended three additional practices be formally adopted. These included such obvious ideas as not allowing analysts who searched phone records in the terror database also to approve which numbers can be searched, and periodically checking the phone numbers that analysts searched to make sure they had actually been approved.

Despite the assurances in 2006 that rules were adequate, problems surfaced in 2009 that were so serious that the intelligence court temporarily shut down the surveillance program.

One of the newly disclosed files was a slap — intentionally or otherwise — at Sen. Patrick Leahy, D-Vt., the chairman of the Senate Judiciary Committee who is leading the fight on Capitol Hill to rein in the government's phone records collection. In a ruling to justify the program by the then-chief judge of the intelligence court, Colleen Kollar-Kotelly, she quoted a 2001 floor speech by Leahy to explain that Congress believed that phone records could be collected under U.S. laws.

Leahy has proposed ending the NSA's sweep of phone records, allowing the government to seek only records related to ongoing terror investigations.

The documents included training materials for NSA analysts, who were warned that they should only search the database of all phone records for numbers they suspected were associated with terrorists: "Analysts are NOT free to use a telephone selector based on a hunch or guess," according to a 2007 training presentation. It added that the NSA's legal standard for picking a phone number for a terror suspect required "some minimal level of objective justification."

The training slides noted that the government shouldn't snoop on the phone records of Americans whose only suspicious behaviors were protected by the First Amendment, such as speaking or writing in opposition to the U.S. government, worshipping at a mosque or working as a journalist.

"A telephone selector believed to be used by a U.S. person shall not be regarded as associated with (censored) solely on the basis of activities protected by the First Amendment," it said.

The documents also include a ruling by Kollar-Kotelly that allowed NSA to gather bulk Internet information such as who Americans e-mail, but not the email content. Litt said Tuesday that the NSA later curtailed that program because it did not prove useful.

___

Associated Press writers Jack Gillum, Stephen Braun, Matt Apuzzo, Lolita C. Baldor, Charles Babington, Marcy Gordon and Richard Lardner contributed to this report.