Scene from a New York City election campaign, Thursday, Sept. 5, 1985. Place: City Hall. Midday temperature: 94 degrees.

Five hundred straphangers have wound up their march across the Brooklyn Bridge to lament the decline of the subways, and now 10,000 Hasidic Jews in long black coats and broad-brimmed hats converge on City Hall shouting, "Dump Koch!" They are protesting a garbage incinerator in their neighborhood.

Nearby, gay activists are demonstrating about an AIDS shelter while members of Teamsters Local 237 arrive for a ceremony to endorse the reelection of Mayor Edward I. Koch.

And where is the mayor?

Ladies and gentleman, step right up. The best-selling author, the subject of a current off-Broadway musical, the 60-year-old living legend from Greenwich Village, his shirt soaked with sweat, is singing and dancing on a bunting-draped platform.

He is to present "a certificate of appreciation" to entertainer Cab Calloway, but the mayor, grinning toward the television cameras, steals the show with his version of the elephant walk to the tune of "Minnie the Moocher."

Political pundits have pronounced the city's mayoral campaign "dullsville" this year, what with Koch's runaway lead over his closest challengers, City Council President Carol Bellamy and Assemblyman Herman D. Farrell. Polls put him more than 35 percentage points ahead.

But if the outcome of Tuesday's Democratic primary is predictable, the election has provided a dramatic forum for a public debate on the health of the nation's largest city, 10 years after its near-bankruptcy.

"Some people say my personality gets in the way of my substantive record," Koch said in an interview last week . "I don't believe them. The city wouldn't be in the shape it is in if I weren't who I am."

Spending more than $5.5 million in the most expensive mayoral campaign in U.S. history, Koch has cast himself as the city's fiscal savior. "New York City today has the lowest unemployment rate in 11 years," he told a cheering crowd last week in Bensonhurst, a lower-middle-class Brooklyn neighborhood.

"When I came into office, this city was on the edge of bankruptcy . . . . I gave spirit back to this town. Crime is down 20 percent since 1981. It's still too high, but its going down. The kids in the school system are now reading above the national norm, doing math above the national norm. We've hired 5,000 cops, 10,000 teachers.

"We have improved the essential services. They're not as good as in 1975, pre the fiscal crisis when they were borrowing a billion dollars a year. But today we are providing services out of current revenues. We're getting back to where we were."

Koch's upbeat message contrasts sharply with the portrait Bellamy and Farrell, the only black candidate, paint of the city.

"Ed, you must be wearing rose-colored glasses," Bellamy snapped during one debate. "You can't tell us the schools are doing better when half the kids drop out."

Brisk and straitlaced, Bellamy marshals a battery of statistics: City high schools have a 42 percent dropout rate; 25 percent of New Yorkers live below the poverty line; half of new jobs are taken by nonresidents; 48,000 fewer rental apartments are available since Koch took office; 20,000 New Yorkers are homeless.

"You can't walk your dog in this city without getting shot," she said.

Farrell accuses Koch of insensitivity to blacks and Hispanics, of catering to the rich.

"We have an election-year budget this year," Farrell adds. "We have a down-turning economy. We will be suffering a major budget deficit next year . . . . Next year, we will be cutting the police force . . . . It reminds me of 1974 when everybody was running on a surplus, and two days after the election was over, that surplus showed up to be a major deficit."

The candidates' opposite visions of the city mirror the widespread concern of economists and urban experts here that, even as the city recovers from its fiscal crisis, the income gap between rich and poor continues to widen. Manhattan is booming with new luxury apartment buildings, while vast sections of the outer boroughs languish.

While Koch's opponents focus on this dichotomy, their campaigns have nonetheless floundered. Bellamy's support of Koch's 1982 gubernatorial candidacy, and her votes for the real-estate tax breaks she now decries made her vulnerable to Koch's charges of "hypocrisy." She raised less than $800,000 and was unable to buy much television time.

Moreover, when Bellamy challenged Farrell's petitions, she gave his largely symbolic candidacy free publicity and, potentially, sympathy votes. Koch's tracking polls in the last week of the campaign showed Farrell, a maverick politician with only lukewarm support among black and Hispanic leaders, nearly catching Bellamy.

However, unlike two recently elected black mayors, Harold Washington in Chicago and W. Wilson Goode in Philadelphia, Farrell has a limited political base. A state representative from Harlem, he is viewed with suspicion across the river by Brooklyn's increasingly powerful black communities. Having raised only $130,000, not enough to buy television commercials, Farrell will be lucky to capture a majority of the votes of the city's blacks. The electorate is 20 percent black.

Koch, a former House member who ran on a pro-death-penalty platform in 1977, barely inching past Mario M. Cuomo in the Democratic primary, has been widely criticized by blacks as making insensitive remarks and as unresponsive to complaints of police brutality.

However, with the appointment of a black police commissioner, Benjamin Ward, and a campaign media blitz featuring black and Hispanic endorsements, the mayor boasts, "I have more support from blacks than my two opponents together."

Beyond his challengers' failures and beyond what The Village Voice calls Koch's "bitchy charisma," the changed psychology of a city that has traveled to the brink of bankruptcy and back underlies the election.

"Since the fiscal crisis, there's been a lowering of expectations," said Queens Democratic leader Donald Manes. "People don't expect the city to spend its way out of all the problems of the poor. Even the poor people don't want the city to go under."

Bellamy calls Koch a "Teflon mayor," for, whether it is a scare about plutonium in the water, corruption of city building inspectors, an unpopular proposal (quickly withdrawn) to raise bridge tolls to Queens or a campaign chest raised largely from real-estate firms that have profited from city tax breaks, Koch manages to deflect most criticism.

"It's uncanny," said Jack Leslie, a political consultant with D. H. Sawyer Associates. "He's the only mayor in America who can go out and say, 'Look at the potholes! Isn't it terrible?' and people don't blame him for it.

"It's part of the New York psyche. We're out for survival. We don't really expect the potholes to be filled and the subways cleaned up. It's a mess, and the feeling is you can't blame Koch or anyone else."

Seeking to shake her prim image, Bellamy dressed in a circus costume and mounted an elephant for the Ringling Brothers parade this spring. But the effort fell flat and, in the summer debates, she has been no match for Koch's Yiddish humor, towering ego and instinct for the jugular.

"When I take him on directly, people say I'm shrill," she remarked in an interview. "When I talk about the issues, they say I'm boring."

Although Bellamy will be on the November ballot as the Liberal Party nominee, the winner of Tuesday's Democratic primary is virtually assured of victory in November.

Koch is already talking about a fourth term -- a feat no local mayor has achieved. But as he told a Harlem audience this spring, "While it was the people who elected me, it was God was who selected me."

Only in New York. CAPTION: Picture, Mayor Koch spent more than $5.5 million seeking a third term, and pollsters say he leads his closest rivals by more than 35 percent in Tuesday's primary. By Larry Morris -- The Washington Post