Federal prosecutors tried unsuccessfully to force Amazon.com to identify thousands of innocent customers who bought books online, then abandoned the idea after a judge rebuked them.

In an order that was sealed but has now become public, U.S. District Judge Stephen Crocker rejected the Justice Department's subpoena for details on Amazon's customers and their purchasing habits. Prosecutors had claimed the details would help them prove their case against a former Madison, Wisc., city official charged with tax evasion related to selling used books through Amazon.

"The subpoena is troubling because it permits the government to peek into the reading habits of specific individuals without their prior knowledge or permission," Crocker wrote in June. Amazon filed the lawsuit to quash the grand jury subpoena.

The case is reminiscent of last year's attempts by federal prosecutors to wrest sensitive search-related information from Google through a subpoena. A California judge eventually rejected the request for users' search queries (and allowed only an excerpt from Google's index of Web sites).

In both cases, the judges worried about public perception. California's Judge James Ware was concerned about the "perception by the public" that Google search terms are "subject to government scrutiny." In the Amazon case, Judge Crocker predicted that "rumors of an Orwellian federal criminal investigation into the reading habits of Amazon's customers could frighten countless potential customers into canceling planned online book purchases, now and perhaps forever."

Instead of giving the Bush administration what it wanted, Crocker split the difference, saying that Amazon could send letters to its customers asking them whether they voluntarily wanted to contact the Feds.

After losing the subpoena fight, Daniel Graber, the assistant U.S. Attorney in Madison, gave up and rescinded his request for the customer records.

The onetime Madison city official who's facing tax evasion, wire fraud, and money laundering charges is Robert D'Angelo. He was indicted in October on charges that he ran a sizable mail order business from his city office, using city computers, and city storage facilities. The business allegedly generated $238,000 in revenue through the sale of music CDs, costume jewelry, and--through Amazon--used books.

Initially, prosecutors demanded "virtually all" records from Amazon dealing with D'Angelo, including "the identities of thousands of customers who had bought used books" from him, according to court documents. Prosecutors subsequently narrowed the request to 120 book buyers, 30 per year for the four years under investigation--on the theory that FBI and IRS agents could then contact those 120 customers.

David Zapolsky, vice president of litigation for Amazon, told the Wisconsin State Journal that his employer tries to protect its customers' privacy rights from governmental fishing expeditions: "When we don 't know what the government wants the information for and we have a doubt whether it violates privacy or First Amendment rights, typically we will dialog with the government and try to understand what their perspective is or we'll make a motion and have a judge decide whether the government has any need for the information."

This subpoena, even more than the one directed at Google, highlights the tension between law enforcement's desire to assemble information--and the privacy rights of Americans who have that information stored by search engines or e-commerce sites.

If the Wisconsin subpoena had been directed at a credit card company or bank, the customer records would probably have been handed over without a fuss (and without any publicity). But booksellers and libraries have unique First Amendment protections under U.S. law that can shield them from some overzealous demands by police for personal information.

In an important 2002 case, the Colorado Supreme Court ruled that police could not serve a search warrant on Denver's Tattered Cover Book Store. Two years earlier, a judge denied the Drug Enforcement Administration's attempts to get sales records from a Borders bookstore as part of a grand jury investigation. And perhaps the most famous case came when independent counsel Kenneth Starr tried unsuccessfully to obtain Monica Lewinsky's purchase records from Kramerbooks, a popular neighborhood bookstore in Washington, D.C.