LOS ANGELES, MAY 14 -- Massachusetts Gov. Michael S. Dukakis ran into one of the most hostile receptions of his campaign for the Democratic presidential nomination today as he defended his views before an audience of gay-rights activists.

The favorite in the June 7 California primary drew vocal protests from 100 gay community leaders who questioned his policies on foster-child placements and discrimination in government jobs in a tense 45-minute meeting in a hotel ballroom this morning.

Despite the demands of the gay men and lesbians, Dukakis repeatedly refused to back down from his state's policy of giving preference in foster-child placements to heterosexual couples with other children. "I just happen to think that's better," he said. However, Dukakis vetoed legislation that would have prohibited gay men and lesbians from being foster parents.

Dukakis further angered some of those in the session by saying that he would not sign an executive order barring discrimination in federal government employment against gay people. He said he prefers to work for legislation at the state and federal level barring all job discrimination based on sexual orientation.

Later, after a briefing from Pasadena police officers on a model community anticrime program, Dukakis answered criticisms from prospective Republican nominee George Bush of his defense and law enforcement views.

Asked why he has not joined Bush in calling for the death penalty for major drug dealers, Dukakis said, "I don't believe in killing people. There are other and better ways of reducing crime. There are other people {Bush} wandering around talking about the death penalty for drug dealers, and they're part of an administration that does business with drug dealers. I think people can see through that."

Dukakis was referring to past U.S. relations with Panamanian strongman Manuel Antonio Noriega, who has been indicted on drug-trafficking charges.

Responding to Bush's charge Friday at a California defense plant that Dukakis was "naive" in his proposals for eliminating some weapons systems, Dukakis said, "Anybody who sat there and did nothing about selling arms to the ayatollah better not lecture others about naivete."

The meeting with the gay leaders, which was placed on Dukakis' schedule because of the growing importance of the gay community in California politics, displayed the divisions within that group.

Outside the hotel, eight pickets protested the invitation to Dukakis from what they termed "conservative gays" and carried signs labeling the governor "a killer" because of his opposition to the state supplying sterile needles to drug users, who are among the fastest-growing groups of new AIDS cases.

Inside, Dukakis was endorsed for the nomination by Jean O'Leary, executive director of the National Gay Rights Advocates, a group that handles gay-rights litigation. She urged the others to drop their demands for "litmus-test proof . . . and deal with the political realities."

"We have in Mike Dukakis a candidate who is instinctively supportive, who has a good record on gay rights issues, who wants our support and who can win. We've never had this before from a candidate for president," she said. "Let's stop comparing Michael Dukakis with Jesse Jackson and start comparing him with George Bush."

Jackson, who is Dukakis' sole remaining rival for the nomination, has solidified his longtime support from gay activists since he was the only presidential candidate to address the gay-rights march in Washington last October.

Dukakis was barraged with questions about his foster family policy. As questioners pressed for a justification of the Massachusetts policy of preference for conventional families, one man shouted that the real reason is "you're anti-gay. Why not say it?"

When Dukakis sought to justify his stand by saying, "There is no constitutional right to be foster parents," the room erupted in hissing.

Dukakis insisted that his record shows he is not anti-gay. He said his state "has the most comprehensive" program of education, prevention and treatment of AIDS in the country, including direct support for AIDS research.

But Dukakis conceded that he has not been able to gain passage of the state bill barring employment discrimination against lesbians and gay men. His reiterated opposition to a federal executive order drew vocal criticism.

Alice Travis, a California Democratic Party leader and Dukakis campaign official, told reporters that gay people claim to provide at least 10 percent of the vote in the general election and a higher proportion in the California Democratic primary.

She said she was not dismayed by the tone of the meeting, saying, "It was very important that leaders of the homosexual community have an opportunity to talk with him and to hear him. He did a very good job with it. He was very open and very direct."

Other aides said whatever support Dukakis lost by his answers would be more than offset by the coverage of his refusal to "pander" to one of the Democratic Party's most vocal constituency groups.