The court, in its first decision of the term, voted 5-4 that the Navy needs to conduct realistic training exercises to respond to potential threats by enemy submarines.
Environmental groups had persuaded lower federal courts in California to impose restrictions on sonar use in submarine-hunting exercises to protect whales and other marine mammals.
The Bush administration argued that there is little evidence of harm to marine life in more than 40 years of exercises off the California coast.
Chief Justice John Roberts wrote the majority opinion, which was joined by Justices Samuel Alito, Anthony Kennedy, Antonin Scalia and Clarence Thomas.
The court did not deal with the merits of the claims put forward by the environmental groups. It said, rather, that federal courts abused their discretion by ordering the Navy to limit sonar use in some cases and to turn it off altogether in others.
The overall public interest tips "strongly in favor of the Navy," Roberts wrote. He said the most serious possible injury would be harm to an unknown number of the marine mammals.
"In contrast, forcing the Navy to deploy an inadequately trained anti-submarine force jeopardizes the safety of the fleet," the chief justice wrote.
In dissent, Justice Ruth Bader Ginsburg said that the Navy's own assessment predicted substantial and irreparable harm to marine mammals from the exercises. She said that "this likely harm ... cannot be lightly dismissed, even in the face of an alleged risk to the effectiveness of the Navy's 14 training exercises." Justice David Souter joined in Ginsburg's dissent.
Roberts pointed out that the federal appeals court decision restricting the Navy's sonar training acknowledged that the record contained no evidence marine mammals had been harmed.
The exercises have continued since the 9th U.S. Circuit Court of Appeals in San Francisco ruled in February that the Navy must limit sonar use when ships get close to marine mammals.
A species of whales called beaked whales is particularly susceptible to harm from sonar, which can cause them to strand themselves onshore.
In other activity this week:
The Salt Lake City-based reigious group hopes to erect a monument in the city's Pioneer Park, which is already home to a Ten Commandments monument that donated by another private group.
The Summum argued, and a federal appeals court agreed, that Pleasant Grove can't allow some private donations in its public park and reject others.
Cities and states worry that a ruling for the Summum would allow almost anyone to erect a monument in a public park, including people with hateful points of view, or lead to the removal of war memorials and other longstanding displays.
The question arises from a Massachusetts drug case and turns on whether defendants' constitutional right to confront witnesses against them extends to lab reports. Prosecutors use such reports in thousands of cases each year. Typically, jurors are given the official reports with no accompanying testimony.