By Dustin Volz

WASHINGTON (Reuters) -- The FBI has used a secretive authority to compel Internet and telecommunications firms to hand over customer data including an individual’s complete Web browsing history and records of all online purchases, a court filing released Monday shows.

The documents are believed to be the first time the government has provided details of its so-called national security letters, which are used by the FBI to conduct electronic surveillance without the need for court approval.

The filing made public Monday was the result of an 11-year-old legal battle waged by Nicholas Merrill, founder of Calyx Internet Access, a hosted service provider, who refused to comply with a national security letter (NSL) he received in 2004.

Merrill told Reuters the release was significant “because the public deserves to know how the government is gathering information without warrants on Americans who are not even suspected of a crime.”

National security letters have been available as a law enforcement tool since the 1970s, but their frequency and breadth expanded dramatically under the USA Patriot Act, which was passed shortly after the Sept. 11, 2001 attacks. They are almost always accompanied by an open-ended gag order barring companies from disclosing the contents of the demand for customer data.

A federal court ruled earlier this year that the gag on Merrill’s NSL should be lifted.

Merrill's challenge also disclosed that the FBI may use NSLs to gain IP addresses on everyone a suspect has corresponded with and cell-site location information. The FBI said in the court filings it no longer used NSLs for location information.

The secretive orders have long drawn the ire of tech companies and privacy advocates, who argue NSLs allow the government to snoop on user content without appropriate judicial oversight or transparency.

Last year, the Obama administration announced it would permit Internet companies to disclose more about the number of NSLs they receive. But they can still only provide a range such as between 0 and 999 requests, or between 1,000 and 1,999. Twitter has sued in federal court seeking the ability to publish more details in its semi-annual transparency reports.

Several thousand NSLs are now issued by the FBI every year, though the agency says it is unaware of the precise number. At one point that number eclipsed 50,000 letters annually.

The FBI did not respond to a request for comment Monday.

(Reporting by Dustin Volz; Editing by Christian Plumb)