A newly released legal opinion written five years ago said the Commerce Department was not required to provide census data to federal law enforcement or national security investigators.

The Justice Department this week turned over a 2010 opinion from its Office of Legal Counsel after abandoning a four-year public records court fight with the Electronic Frontier Foundation, a San Francisco-based privacy group that sued for access to the memo and other documents.

The opinion came at the request of the Commerce Department's chief lawyer, who sought clarification on what census information could be handed over under the USA Patriot Act. The Census Bureau falls under that department, and administers the decennial Census and other detailed demographic surveys.

In the memo, the Justice Department held that provisions of federal law that protect the confidentiality of census data could not be overridden by the Patriot Act, including Section 215 — the section used by the National Security Agency for its bulk collection of Americans' phone records.

The opinion does not detail why the Commerce Department sought the legal guidance. But the fact the opinion was requested in the first place suggests the federal government may have been looking to mine census data for law enforcement or national security investigations.

"This is the first sign that Section 215 has limits," said Mark Rumold, an EFF staff attorney. "It's heartening to know, at least, that the government thinks that hundreds of years of tradition in protecting Census information, and multiple acts of Congress, are sufficient to put a limit on Section 215."

The Justice Department had earlier refused to make public the memo, but last week it dropped an appeal of a federal judge's order requiring it to do so.