"We are aware of the court's decision and we are studying it," said Navy spokeswoman Lt. Cmdr. Cindy Moore in Washington D.C.

The president signed a waiver Jan. 15 exempting the Navy and its anti-submarine warfare exercises from a preliminary injunction creating a 12-nautical-mile, no-sonar zone along California's Southern coast. The Navy's attorneys argued in court last week that he was within his legal rights.

U.S. District Judge Florence-Marie Cooper wrote in a 36-page decision Monday that the Navy is not "exempted from compliance with the National Environmental Policy Act and this Court's injunction."

Environmentalists have been fighting the use of sonar in court, saying it is harmful to whales and other marine mammals.

"It's an excellent decision," said Joel Reynolds, attorney for the National Resources Defense Council which is spearheading the legal fight. "It reinstates the proper balance between national security and environmental protection."

The Navy last week wrapped up a training exercise by the carrier strike group of the USS Abraham Lincoln where sonar was used. There are currently no task force training exercises off the coast of California using sonar.

When he signed the exemption, Bush said that complying with the law would "undermine the Navy's ability to conduct realistic training exercises that are necessary to ensure the combat effectiveness of carrier and expeditionary strike groups."

"I've always felt that the president's actions were illegal in this case and the judge has affirmed that point of view with the decision today," said Reynolds.