Washington — The US Supreme Court has invalidated two court-imposed restrictions aimed at protecting whales and other marine mammals from powerful Navy sonars during anti-submarine warfare training off the southern California coast.

In a 6-3 ruling on Wednesday, the high court criticized a federal judge in California for imposing restrictions that the majority justices said jeopardized national security in an effort to protect the environment.

“We do not discount the importance of plaintiffs’ ecological, scientific, and recreational interests in marine mammals,” Chief Justice John Roberts wrote for the majority. “Those interests, however, are plainly outweighed by the Navy’s need to conduct realistic training exercises to ensure that it is able to neutralize the threat posed by enemy submarines.”

The case, Winter v. Natural Resources Defense Council, involved a dispute between the Navy and a group of conservationists over the use of mid-frequency active (MFA) sonar during large-scale naval training exercises.

MFA sonars send intense pulses of noise through the water that can disrupt or injure marine mammals nearby. Scientists say it can trigger fatal mass strandings under certain circumstances.

In March 2007, the NRDC and five other environmental groups filed a lawsuit seeking to force the Navy to be more careful when using MFA sonar during 11 planned training exercises. They said the Navy had failed to properly complete an environmental impact study (EIS).

A federal judge issued a preliminary injunction and ordered the Navy to halt its training exercises unless it adopted court-ordered mitigation measures to reduce the potential harmful effects of the sonars. The measures, as upheld by the Ninth US Circuit Court of Appeals, required the Navy to reduce sonar power whenever a marine mammal was spotted within 1.25 miles of a sonar source. In addition, during certain thermal conditions, the Navy was ordered to reduce sonar power by 75 percent when marine mammals were detected in the area.

Chief Justice Roberts said the federal judge as well as the appeals court judges failed to properly defer to senior Navy officers who warned that the measures would reduce the effectiveness of its training exercises. “We conclude that the balance of equities and consideration of the overall public interest in this case tip strongly in favor of the Navy,” Roberts wrote.

“For the [environmentalists], the most serious possible injury would be harm to an unknown number of the marine mammals that they study and observe,” he wrote. “In contrast, forcing the Navy to deploy an inadequately trained antisubmarine force jeopardizes the safety of the fleet.”

In an important caveat, the chief justice added: “Military interests do not always trump other considerations, and we have not held that they do. In this case, however, the proper determination of where the public interest lies does not strike us as a close question.”

In a dissent, Justice Ruth Bader Ginsburg said the court-ordered mitigation measures were “manageable” and justified. She said the Navy’s own assessments predicted “substantial and irreparable harm to marine mammals.”

Joel Reynolds, a senior NRDC attorney, said the high court left in place undisputed portions of the federal judge’s order concerning Navy training. As a result, the Navy must continue to abide by a 12-mile coastal buffer zone and must continue to avoid the Catalina Basin, an area with a high concentration of marine mammals.

Mr. Reynolds said the NRDC would continue to monitor the Navy’s use of sonar and to push for more safeguards.

He said despite the loss at the high court, the sonar case and other efforts are paying dividends for the environment.

“This case is the most recent in a series of challenges brought by this group in the last 10 years,” Reynolds said. “We’ve seen a definite change in the level of attention paid to environmental impacts on the part of the Navy. They are now in the process of completing environmental impact statements for planned sonar activities, not just off southern California, but off the southeast coast, Hawaii, and off the Washington coast.”

Reynolds added, “We’ve seen significant progress.”

When the case was argued in October, the dispute attracted attention in part because the Bush administration was framing it as a major showdown over the power of federal judges versus the power of the executive branch and the commander in chief.

The justices did not address those arguments. Rather, the court conducted a standard balancing of interests in assessing the lower court rulings.

Where the lower courts sided with environmentalists, the Supreme Court majority sided with the Navy. The majority justices said the ultimate issue in the case was whether the Navy had to complete an environmental impact statement. “A court concluding that the Navy is required to prepare an EIS has many remedial tools at its disposal, including declaratory relief or an injunction tailored to the preparation of an EIS rather than the Navy’s training in the interim,” Roberts wrote. “In the meantime, we see no basis for jeopardizing national security, as the present injunction does.”