SAN FRANCISCO (AP) — A federal judge has ordered Google Inc. to comply with FBI warrantless demands for customer data. U.S. District Court Judge Susan Illston on Tuesday rejected Google’s argument that the so-called National Security Letters the company received from the FBI were unconstitutional and unnecessary. Illston ordered Google to comply with the secret demands even though she found the letters unconstitutional in March in a separate case filed by the Electronic Frontier Foundation. She acknowledged as much in her four-page order in the Google case made on May 20 and obtained by the Associated Press on Friday

Illston put the Google ruling on hold until the 9th U.S. Circuit Court of Appeals could decide the matter. Until then, she said the Mountain View, Calif.-based company would have to comply with the letters unless it showed the FBI didn’t follow proper procedures in making its demands for customer data in the 19 letters Google is challenging.

After receiving sworn statements from two top-ranking FBI officials, Illston said she was satisfied that 17 of the 19 letters were issued properly. She wanted more information on two other letters.

Google could appeal Illston’s decision. The company declined comment Friday.

Kurt Opsah, an attorney with the Electronic Frontier Foundation, said it could be many more months before the appeals court rules on the constitutionality of the letters, which the FBI sends to telecommunication companies, Internet service providers, banks and others amid terror investigations. The letters are used to collect unlimited kinds of sensitive, private information, such as financial and phone records. It was unclear from the judge’s ruling what type of information the government sought to obtain with the letters. It was also unclear who the government was targeting. In March, Illston found that the FBI’s demand that recipients refrain from telling anyone — including customers — that they had received the letters was a violation of free speech rights.

“We are disappointed that the same judge who declared these letters unconstitutional is now requiring compliance with them,” Opsah said on Friday.

Illston’s order omits any mention of Google or that the proceedings have been closed to the public.

But the judge said “the petitioner” was involved in a similar case filed on April 22 in New York federal court.

Public records show that on that same day, the federal government filed a “petition to enforce National Security Letter” against Google after the company declined to cooperate with government demands.

The letters, along with the recent seizure of reporters’ phone records by President Barack Obama’s administration, have prompted complaints of government privacy violations in the name of national security.

In 2007, the Justice Department’s inspector general found widespread violations in the FBI’s use of the letters, including demands without proper authorization and information obtained in non-emergency circumstances. The FBI has tightened oversight of the system.

The FBI made 16,511 national security letter requests for information regarding 7,201 people in 2011, the latest data available.