On the eve of the Iowa campaign caucus, Sen. Edward M. Kennedy (D-Mass.) narrowly defeated President Carter in a presidential preference poll of delegates at California's Democratic state convention here today.

But the vote was so close -- 42 percent of the 1,500 delegates polled for Kennedy and 40 percent for Carter that both candidates claimed victory and other observers viewed the results as inconclusive.

Even before the vote, campaign representatives for Kennedy and California Gov. Edmund G. (Jerry) Brown Jr. downplayed the signifcance of the nonbinding poll. The straw vote does not affect the state's delegation to the Democratic National Convention. Those delegates will be chosen in a primary election in June.

Nonetheless, the poll attracted attention as an early indicator of the leanings of Democratic Party regulars in the nation's most populous state. The Kennedy and Carter campaigns in particular engaged in a last-minute blitz of phone calls, mailings and other lobbying to win support from the delegates.

"In the first round we came out slightly ahead," former New York congressman Allard Lowenstein, who attended the convention on Kennedy's behalf, said after today's balloting. "We had a great receding of support for Kennedy over the last few months," Lowenstein added, saying today's vote had "reversed the tide."

Les Franis, Carter's national staff director, countered that the president came in a "very, very close second," and called the results a "key win for our campaign."

Francis referred to previous public opinion polls in California that showed Carter trailing Kennedy badly, and said the vote today was "a very significant showing and a comeback for the Carter-Mondale campaign."

The poll was somewhat of an embarrassment for the faltering presidential campaign of Brown, who garnered only 14 percent of the vote among the party activists in his home state. Brown has frequently been at odds with party officials over his maverick political stances and frequent out-of-state campaign trips.

Brown's chief of staff, Gray Davis, insisted, howver, 'the governor did far better than either of his rivals predicted," and said the significance of the poll was 'minimal."

California Democratic Party Chairman Richard O'Neill said the outcome of the poll was "a victory for Kennedy's operation" in getting out delegate votes for the senator.

But O'Neill added that the narrow margin between Kennedy and Carter, and the failure of either to gain a majority vote, diminished the importance of the poll.