SAN FRANCISCO — The National Security Agency repeatedly violated privacy rules between 2006 and 2009 by running phone record searches without sufficient intelligence tying some of the numbers to suspected terrorists, according to U.S. officials and documents that were declassified on Tuesday.

The Foreign Intelligence Surveillance Court, which oversees requests by spy agencies to tap phones and capture email in pursuit of information about foreign targets, requires the NSA to have a “reasonable articulable suspicion” that phone numbers were connected to suspected terrorists before agents could search a massive call database to see what other numbers they had connected to, how often and for how long.

But between 2006 and 2009, the alert list the agency used to search fresh raw calling data collected each day grew from about 3,980 to 17,835, and only 2,000 of the larger number met that standard for reasonable suspicion, senior intelligence officials said.

The new disclosures add a fresh perspective to recent statements by the NSA Director Keith Alexander than only 300 or so numbers were run against the calling database in 2012. That could be because the queries were curtailed after the NSA admitted to the court that it had not followed its previous directives.

The documents were declassified by the Office of the Director of National Intelligence after a long fight with the Electronic Frontier Foundation, the civil liberties group that filed a Freedom of Information Act lawsuit two years ago.

The lawsuit gained steam after former NSA contractor Edward Snowden leaked thousands of documents about the agency’s practices, including an earlier surveillance court ruling compelling Verizon Communications Inc. to turn over all its raw calling records, though not the content of the calls. Officials confirmed that document was genuine and declassified some related papers.

After a related lawsuit, the government last month released another ruling by the same 11-member court that found some of the NSA’s email collection practices were unconstitutional because they scooped up tens of thousands of emails among Americans.

Director of National Intelligence James Clapper said in a statement posted to a public website that the latest declassified documents showed that intelligence officials had self-reported problems with the program and corrected them.

“The government has undertaken extraordinary measures to identify and correct mistakes that have occurred in implementing the bulk telephony metadata collection program — and to put systems and processes in place that seek to prevent such mistakes from occurring in the first place,” Clapper said.

Other officials, speaking on condition of anonymity, said none of the mistakes had been deliberate.

In January 2009, the court ruled that the conduct has been “directly contrary to the sworn attestations of several executive branch officials.”

For a time after the 2009 ruling, the NSA was required to seek court approval for every query to the database. After the NSA changed its procedures, the court again allowed the agency to conduct queries on its own.