NEW YORK -- Walking home from the store on a sunny day last weekend, Michelle Knight could hardly believe her eyes: Amid the straggly grass and weeds of her South Bronx neighborhood park was Rudolph W. Giuliani, the Republican candidate for mayor, raking up smashed bottles.
"If he wants to clean up the park, that's fine with me," Ms. Knight said. "But he sure doesn't belong in this part of town."
In fact, Mr. Giuliani did look slightly out of place. Dressed for a visit to a baseball game and surrounded by a phalanx of white supporters and security men, the 49-year-old looked as if he would gather few votes for the Nov. 2 election in this predominantly black and Latino neighborhood.
But in today's New York, the trip made sense. Immigration is changing the city's demographic mix, forcing politicians to test creative coalitions that would have seemed unlikely a few years ago.
To make the strategy work, they are also having to augment sophisticated television campaigns with appeals that the new immigrants can better understand: the smile and the handshake.
"You can't just put together a few groups and win anymore. It's becoming much more complex here and nationally as our cities become more diverse," said Jerome Krase, a sociology professor at Brooklyn College.
The South Bronx, for example, may be best known to visitors as the crime-ridden home of Yankee Stadium, but it also has voters eager to hear Mr. Giuliani's message of law and order and civic pride.
"This area used to be wonderful. When I was a kid in the 1950s, Yankee Stadium was a home away from home for me. I don't know why we can't work to rebuild this area," Mr. Giuliani said as he walked through the neighborhood streets and chatted up passers-by.
While some residents sneered at the visit's stage-managed appearance, others were attracted to the former federal prosecutor.
"I'm considering him. Nothing has improved over the past four years," said Esther Rodriguez, a 31-year-old mother who said she often fears for her 2-year-old daughter, Yanelly.
Such statements bode ill for incumbent Mayor David N. Dinkins, the city's first black mayor, who fashioned a traditional Democratic coalition of blacks, Latinos and liberal Jewish voters four years ago.
Hampered by criticism of his handling of racial incidents and general dissatisfaction tied to the bad economy, Mr. Dinkins is running uphill.
Polls show either a lead for Mr. Giuliani or a tie, raising the possibility that Mr. Dinkins might be the first big-city black mayor not to be re-elected and that Mr. Giuliani might be only the third Republican this century to be New York City's mayor.
Behind both men's search for new voters is the fact that neither commands a dominant chunk of votes.
Although polls show that 90 percent of blacks still support Mr. Dinkins, that only gives him 25 percent of the registered voters.
Mr. Giuliani has strong support among white ethnic groups and Roman Catholics, who make up a third of registered voters.
This leaves the remaining two large voting blocs, Jews and Latinos, as potential swing votes. In addition, newly arrived immigrants from Asia are expected to play a role for the first time.
Latinos voted overwhelmingly for Mr. Dinkins four years ago, but this group is increasingly conservative, said Edward Rogowsky, director of Brooklyn College's Urban Studies Program.
Appeals to religion, for stronger policing and family values go over well among the new Americans from Puerto Rico and Latin American nations, he said.
Another draw for Hispanics: Mr. Giuliani is running on a ticket with Herman Badillo, the Hispanic former deputy mayor under conservative Democrat Edward Koch.
A poll by the Hispanic Federation showed that 30 percent of Latino voters could back Mr. Giuliani, which would be about 5 percentage points higher than Republican mayoral candidates typically poll.
Mr. Dinkins has also done little to win the Latino vote, with many feeling cut out of his inner circle.
His record has also worked against him among Jewish voters, who have been prodded by racial attacks to back Mr. Giuliani.
Besides Latino and Jewish voters, both sides are trying to reach the city's burgeoning Asian population, which numbers more than 750,000.
Even though few are voters, Asians could provide the margin of victory in a close election. The 1989 election was decided by just 22,000 votes out of 1.8 million.
Strategists also say Asians hold enormous potential when they become more established and start organizing politically.
This need to reach as many ethnic groups as possible puts an interesting twist on New York City's election.
Although it's the world's financial, marketing and media capital, the city still forces politicians to press the flesh, said Philip Thompson, an adviser to the Dinkins campaign.
While television ads are important, they are generally produced for white audiences, he said, making them ineffective among other groups.
"It's not like you can just air your attack ads and click into autopilot," Mr. Thompson said. "Many minority groups don't get the ads, so you have to meet them through traditional means."
This realization has sent both candidates on a carefully balanced schedule of visits to the city's five boroughs and numerous communities.
On one recent campaign day, for example, Mr. Giuliani visited the Pulaski Day Parade, the Italian American Pride Parade and the Third Avenue Festival in Brooklyn's hodgepodge Bay Ridge district.
Just as immigration destroyed old coalitions in Los Angeles, leading to an upset in that city's recent mayoral election, so too could New York City's politics be facing a similar transformation.
"If Dinkins loses, it may be harder to get a black mayor the next time around," said Mr. Krase, the Brooklyn College sociology professor.
"He likes to talk about New York being a gorgeous mosaic, but that could be his weakness. This city is just not as predictable as it once was, and no group is as dominant as it once was."