The Justice Department for seven years failed to implement a provision requiring it to create privacy rules for use of an intelligence-gathering tool authorized by the USA Patriot Act, the department’s inspector general said in a new report.

The law in question is Section 215 of the Patriot Act, a measure that has provoked controversy for its once-secret use allowing the mass collection of Americans’ phone records. With the law expiring in 10 days, Congress is debating whether it should be renewed, amended or allowed to lapse.

Beyond the bulk collection of phone records, the law also enables intelligence agencies to obtain court orders to gather all manner of records in foreign terrorism investigations.

Under a 2006 reauthorization of the law, the government was supposed to have adopted that year “minimization” procedures to protect the privacy of Americans whose data was gathered.

Instead, the Justice Department adopted interim rules. Those rules, the inspector general said, “failed to provide FBI agents with specific guidance” as to how long they could keep “non-public” data of Americans and with whom that data could be shared.

Finally in August 2013, the department adopted rules that met the statute, the report said.

“We do not believe it should have taken seven years for the department to develop minimization procedures,” the report said.

After reviewing a draft of the report, the Justice Department’s National Security Division told the inspector general’s office that it had failed to recognize the department’s efforts over the years to craft new procedures. Those efforts included “extensive interaction” with the Foreign Intelligence Surveillance Court, the report said.

Nonetheless, the inspector general’s office said, “we found a significant amount of the delay is attributable to the department, specifically to disagreements between the FBI and NSD” over how to craft the rules.

“The FBI’s failure to comply with the statute’s minimization procedures for seven years is an indictment of the intelligence community’s system of secret oversight,” said Alex Abdo, a staff attorney with the American Civil Liberties Union.

This week, FBI Director James B. Comey stressed the importance of Section 215 outside of the bulk collection of phone logs. He said the tool is “critical” to secure records that cannot be obtained through other investigative means, such as a grand jury subpoena or a national security letter in a counterterrorism investigation.

The report acknowledged that agents and attorneys said that Section 215 was valuable in such cases. But it also said the agents interviewed “did not identify any major case developments” resulting from the tool’s use. Rather, they told the inspector general, Section 215 was useful in supporting other investigative requests and corroborating other information.

The report stressed that rapid advances in technology are broadening the scope of materials sought using Section 215. They range from “hard copy reproductions of business ledgers and receipts to gigabytes of metadata and other electronic information,” the report said.

“While the expanded scope of these requests can be important uses of Section 215 authority, we believe these expanded uses require continued significant oversight” by the courts, the Justice Department and Congress, the report said.