Scottish environmental campaigners are awaiting the outcome of a landmark American court case which could affect the way navies are allowed to use powerful sonars which can confuse, injure, or even kill whales and dolphins.

A Californian federal judge is expected to rule this week on whether the military can be forced to obey laws relating to the protection of marine life instead of claiming immunity on national security grounds.

At the centre of the debate is the Low Frequency Active (LFA) sonar system used by both the US and Royal navies to hunt and locate submarines by bouncing high-intensity sound-waves from their hulls.

The system emits a noise that can produce 160 decibels at a range of more than 120 miles, 50 times louder than the US Navy's own safe-sound limit for human divers. Tests on the British version of the system, known as sonar 2087, have been carried out at the Butec base, at Kyle of Lochalsh. The range is a laboratory for submarine development, covering a huge area of sea from the base north through the Sound of Raasay.

In Britain, the MoD is subject to all the wildlife legislation on the statute book. None has been applied to the LFA system.

The California stand-off began in late 2006, after the US Navy announced it would conduct 14 training operations off southern California between early 2007 and 2009. The exercises would involve extensive use of mid-frequency active sonar. Under the plan, the sonar would be used throughout thousands of square miles of ocean and would be permitted near Channel Islands National Park off Santa Barbara.

The Navy sent its plans to the state coastal commission for review, but excluded any mention of the sonar, claiming it would have no impact on the coast. The commission disagreed and proposed 12 preventative measures for the protection of marine mammals.

The navy responded by obtaining a formal exemption from the Marine Mammal Protection Act - the law that most clearly limits actions potentially harmful to whales.

The navy maintains it already minimises risks to marine life and has 29 existing procedures in place to avoid harming marine mammals. It also says that what the council and other groups are seeking would cripple essential sonar training which could cost human lives in war.

Environmentalists say evidence gathered since the mid-1990s connect sonar with mass strandings of whales, particularly the deep-diving beaked whale. A 2000 beaching of an entire whale pod in the Bahamas during a US Navy sonar exercise provided the first conclusive evidence that the sounds were driving some whales ashore to their deaths.

The Royal Navy meanwhile says it has developed "a range of mitigation measures to minimise the impact of sonar fitted to surface warships". These include cutting off the 2087 sonar system when whales, dolphins, and other cetaceans are detected nearby, and steering clear of areas known to be popular breeding-grounds.

It is estimated that as many as 27 species of whales, porpoises and dolphins visit Scottish waters.