Only a few months ago, the vast majority of black elected officials in New York were expected to support the presidential candidacy of Senator Hillary Rodham Clinton. But no longer.

In a series of interviews, a significant number of those officials now say they are undecided about whether to back Mrs. Clinton or one of her main rivals for the Democratic nomination, Senator Barack Obama of Illinois, the only black politician in the race.

The officials described themselves as impressed with the strength of Mr. Obama’s campaign in recent weeks, saying it reflected a grass-roots enthusiasm for Mr. Obama that many noticed among black voters in their own districts. And that could signal trouble for Mrs. Clinton, forcing her to devote precious attention to her home state, where blacks made up 20 percent of the Democratic primary vote in 2004, just as she has had to scramble to keep black support nationwide.

Facing a potential drift of black support, the Clinton campaign has recently taken several steps: dispatching former President Bill Clinton to speak before black and Hispanic lawmakers in Albany earlier this year, and then to address the Rev. Al Sharpton’s group, the National Action Network, in New York last week; using Bill Lynch, who was a top political adviser to former Mayor David N. Dinkins, to corral black support in New York City; and enlisting heavyweights from the black political establishment like Representative Charles B. Rangel, Democrat of New York, to help Mrs. Clinton court black leaders.