A pacifist-inspired local ballot measure designed to ban nuclear-weapons-related work is drawing intense scrutiny from Navy officials and forcing one of the nation's top defense contractors, Lockheed Corp., into a costly electoral struggle.

The measure on the ballot tommorrow in Santa Cruz County, 70 miles south of San Francisco, seeks to close down a key Lockheed facility that manufactures the primer cord used to detonate fuses and initiate the separation of the stages for the Navy's entire fleet ballistic missile program.

The ballot initiative, known as Measure A, prohibits "the manufacture and testing of nuclear weapons or their components in Santa Cruz County." Measure A's immediate effect, if passed, would be to force Lockheed to stop all its nuclear weapons work within five years at its plant on a hilltop 20 miles from the seaside resort city of Santa Cruz.

Proponents of the measure, largely pacifists and nuclear power opponents, contend that the presence of the Lockheed plant, which handles no nuclear material, constitutes a threat to the "health, safety, morals and general welfare" of local residents.

"It's possible that there's a warhead somewhere with the name Santa Cruz written on it," said Dan Haifley, a 22-year-old pacifist and one of the authors of the measure. "If we didn't have this facility, maybe we wouldn't have this missile."

The Lockheed Santa Cruz facility's chief engineer, Vernon Smith, denies the plant presents a security risk for the county. "This is just a mischief-making measure to victimize high technology companies interested in defense," Smith said. "They try to say we make the county a target, but, frankly, we're not worth a bomb."

Despite Lockheed's disclaimers, a Navy spokesman, Lt. C. D. Smith, described the Santa Cruz plant as "an important one" because it is the only place authorized to make the components for separating the Navy's Poseidon, Polaris and Trident nuclear missiles. Lt. Smith said the Navy was "aware" of the Measure A controversy, but "it would be inappropriate for the Navy to comment on this local issue."

Lockheed, however, has thrown its full weight into the Measure A battle. It has spent more than $150,000 to date in its attempt to defeat the measure, more than $2 for each of the 70,000 voters expected to cast ballots in tomorrow's election.

Lockheed and its supporters among the more conservative elements in the county have stressed the need for a strong national defense and the plant's contribution to the local economy. The Lockheed plant employs 350 persons and put more than $12 million in salaries into the local economy last year.

Supporters of Measure A charge that Lockheed is trying to win the election with a scare campaign appealing to economic insecurity and jingoistic sentiments. "They know this could start something," said Chris Matthews, one of the two members of the County Board of Supervisors backing the measure. "They're using apple pie and motherhood to say it's unpatriotic to go against nuclear power."

The campaign over Measure A has exacerbated the polarization that has developed in Santa Cruz since the 5,000-student University of California campus opened here in the early 1970s. The Santa Cruz school, which appeals predominantly to nature-loving liberal arts majors, has been perhaps the most consistently liberal campus in California and is greatly resented by some of the more conservative established residents of the county.

"The university has been a hotbed for all sorts of off-beat political philosophy," said Pat Liberty, chairman of the country board of supervisors and a strong opponent of Measure A. "They are basically oriented toward a socialist philosophy which says we should lay down our arms and be friends with the world. They don't represent many people in Santa Cruz and that's why they're heading toward a resounding defeat."

A recent poll commissioned by Lockheed showded the measure losing by more than 2 to 1, according to a source close to the measure's opponents.

Even if the ballot initiative passes, many believe it will be thrown out by the courts for infringing on the military prerogatives guaranteed to the federal government in the U.S. Constitution. Lockheed has already announced it will file suit against the measure if it passes, and Navy attorneys reportedly are looking at the initiative's legal standing.