Many years ago, the Navy made that hardy and resourceful animal - the goat - its official mascot, but today the service finds itself placed in a peculiar position by that same animal.

The controversy stirred up by a plan to slaughter a herd of wild goats on San Clemente Island off the coast of Southern California has the Navy "caught between a rock and a hard place," according to a spokesman.

A federal court has issued a temporary restraining order blocking the Navy's plan to shoot the goats.

Jan Larson, Navy wildlife biologist, and other biologists say that the crux of the problem is that the goats have been eating or trampling the habitats of four plant species, two bird species and a lizard species, all unique to San Clemente Island and most of them on the endangered species list.

The situation, Larson said, has been under study for at least seven years.

About five years ago, when the goat herd on the island numbered around 16,000, a trapping program was instituted. It netted all but a few hundred. The survivors, now believed to have reproduced and reached a population of about 3,000, scattered into remote canyons described as "totally inaccessible to man."

"Every small group of goats is associated with some of these inaccessible canyons," Larson said. "Almost all the canyons have trees such as ironwood, elderberry, oak and cherry, several of which are found only on the Channel Islands.

"And the ranges of the endangered birds and the lizards, as well as the four plants, are connected with these canyons.

"The goats' hooves wear away the soil at the base of the trees, making them topple. Then they eat the foliage, and they eat any seedings as soon as they sprout."

The goats, which reproduce at a rate that almost doubles their numbers each year, gobble up every green thing they can find, biting close to the ground - even eating roots - and setting up massive erosion problems, Larson said.

Fears that they could create similar situations elsewhere prompted the rejection earlier this month of a proposal that they be caught and brought to the mainland.

The idea, suggested by Los Angeles City Councilman Robert M. Wilkinson, was to put the goats to work in the Santa Monica Mountains where they could reduce five hazards by eating brush and grass.

But problems developed.

"First of all," a Navy spokesman said, "we can't capture them."

Second, said Los Angeles County Fire Chief John C. Gerard, goats are "too voracious," and "too uncontrollable" to be turned loose in herds of 3,000 or more. He said not only would their foraging cause erosion problems, but that they could wander into private gardens and destroy them.

"The truth is," Larson said, "I'm more concerned about the island in general than about any specific animal or plant, like those listed as endangered. "We're really talking about preservation of the island itself, trying to preserve an entire ecosystem."

The Endangered Species Act protects various native plants and animals of the island, a small portion of which - about 2 percent of the 57 square miles - is used for gunnery practice. The Navy and the Fish and Wildlife Service decided that the only way to get rid of the remaining goats was to shoot them from a helicopter.

The operation was to have started about June 1, but various animal protection groups obtained the restraining order.

Ken Mitchell, a Navy spokesman in San Diego, said: "It took us 2 1/2 years [to make the decision to shoot the goats] and now we're back to ground zero."