Updated

A federal judge ruled Thursday that the government's warrantless wiretapping program is unconstitutional and ordered an immediate halt to it.

U.S. District Judge Anna Diggs Taylor in Detroit became the first judge to strike down the National Security Agency's program, which she says violates the rights to free speech and privacy as well as the separation of powers enshrined in the Constitution.

"Plaintiffs have prevailed, and the public interest is clear, in this matter. It is the upholding of our Constitution," Taylor wrote in her 43-page opinion.

Click here to read the judge's opinion (pdf).

The U.S. Justice Department appealed the ruling and issued a statement saying the program is "an essential tool for the intelligence community in the war on terror."

"In the ongoing conflict with Al Qaeda and its allies, the president has the primary duty under the Constitution to protect the American people," the department said. "The Constitution gives the president the full authority necessary to carry out that solemn duty, and we believe the program is lawful and protects civil liberties."

The ruling won't take immediate effect so Taylor can hear a Justice request for a stay pending its appeal. For its part, the White House issued a statement saying the Bush administration couldn't disagree more with the decision.

"The terrorist surveillance program is firmly grounded in law and regularly reviewed to make sure steps are taken to protect civil liberties. The terrorist surveillance program has proven to be one of our most critical and effective tools in the war against terrorism, and we look forward to demonstrating on appeal the validity of this vital program," reads a statement released by Press Secretary Tony Snow.

The American Civil Liberties Union filed the lawsuit on behalf of journalists, scholars and lawyers who say the program has made it difficult for them to do their jobs. They believe many of their overseas contacts are likely targets of the program, which involves wiretapping conversations between people in the U.S. and those in other countries.

The government argued that the program is well within the president's authority, but said proving that would require revealing state secrets.

The ACLU said the state-secrets argument was irrelevant because the Bush administration already had publicly revealed enough information about the program for Taylor to rule.

"At its core, today's ruling addresses the abuse of presidential power and reaffirms the system of checks and balances that's necessary to our democracy," ACLU executive director Anthony Romero told reporters after the ruling.

He called the opinion "another nail in the coffin in the Bush administration's legal strategy in the war on terror."

While siding with the ACLU on the wiretapping issue, Taylor dismissed a separate claim by the group over NSA data-mining of phone records. She said not enough had been publicly revealed about that program to support the claim and further litigation would jeopardize state secrets.

The lawsuit alleged that the NSA "uses artificial intelligence aids to search for keywords and analyze patterns in millions of communications at any given time." Multiple lawsuits have been filed related to data-mining against phone companies, accusing them of improperly turning over records to the NSA.

However, the data-mining was only a small part of the Detroit suit, said Ann Beeson, the ACLU's associate legal director and the lead attorney on the case.

Beeson predicted the government would appeal the wiretapping ruling and request that the order to halt the program be postponed while the case makes its way through the system. She said the ACLU had not yet decided whether it would oppose such a postponement.