
The sonar is used to detect underwater objects like submarines and is critical to readiness training, Navy officials said.
"The U.S. Navy's use of sonar, and the ability to test and train with it, is critical to the national security of the United States," the government argued before the start of the hearing in the U.S. District Court in Los Angeles.
Three tests have taken place off the California coast and 11 more were scheduled through 2009.
But the NRDC claims the sonar, which shoots bursts of sound, is so loud it kills whales.
"Scientists all agree that mid-frequency sonar causes whales to strand and die," said Joel Reynolds, senior attorney at NRDC and director of its marine mammal protection program.
The NRDC filed a similar lawsuit in Hawaii, where a court ordered the Navy to implement measures to protect whales before proceeding with its exercises.
"This is among the most biologically rich areas in the country," Reynolds said about the area off the California coast. "It's an extraordinary place and it's the wrong place to be testing with sonar technology that's known to kill whales."
The NRDC said it expects the judge to issue a final decision later on Monday or Tuesday.
Navy officials said they will appeal.