Four days after a judge halted the Navy's use of high-intensity sonar in Pacific warfare exercises because of concerns that marine mammals may be harmed, the Navy and environmental groups agreed to terms under which the sonar may be used, lawyers for both sides said Friday.

The settlement prevents the Navy from using the sonar within 25 miles of the newly established Northwestern Hawaiian Islands Marine National Monument during its Rim of the Pacific 2006 exercises, and also imposes a variety of methods to watch for and report the presence of marine mammals.

The environmental groups, led by the Natural Resources Defense Council, had obtained a court order Monday temporarily barring the use of the "mid-frequency active sonar."

After the settlement was reached, U.S. District Court Judge Florence-Marie Cooper signed an order dismissing the environmentalists' lawsuit.