The intense battle for second place in the Democratic mayoral primary finally got Gifford Miller and Anthony Weiner to joust in the final debate of what has so far been one of the most polite campaigns in years.

After Miller finished explaining why he opposed a waste-transfer station in his home district on the Upper East Side – and after C. Virginia Fields described Miller’s stance as “absolutely right” – Weiner went for the jugular.

“I’m troubled by the debate because it ignores some communities that are perhaps not as politically sophisticated and affluent,” Weiner interjected in the one-hour showdown.

“One thing I’m going to do as mayor is not just look out the window of Gracie Mansion and say these are my constituents. I’m going to look at all five boroughs.”

Miller seized his chance to strike back when Weiner said his first official act as mayor would be to remove fingerprinting requirements for food-stamp applicants.

“I want to thank the congressman for mentioning the food-stamp issue because in the City Council we just passed legislation over the mayor’s veto to do just that,” said Miller, the council speaker.

But Weiner wasn’t finished. When his turn came, he swung back.

“I want to thank the speaker for adopting something I proposed in one of my first policy speeches on the campaign trail,” he jabbed.

Polls show that Weiner and Miller are in a tight battle for the runner-up position in a largely static race where front-runner Fernando Ferrer has never surrendered the lead.

But with just days before Tuesday’s primary, three public polls this week reported Ferrer getting 32 to 35 percent – short of the 40 percent he needs to avoid a Sept. 27 runoff against the No. 2 finisher.

In other campaign news, Mayor Bloomberg yesterday inserted an ocean’s distance between himself and Independence Party activist Lenora Fulani.

“I do not agree with Lenora Fulani on virtually anything I’ve ever heard her say,” the mayor said during his daily press conference.

Fulani responded by issuing a statement saying she intends to back the mayor whether he wants it or not.

“With due respect to the mayor, this election is not about Mike Bloomberg or Lenora Fulani. It’s about the people of this city. The people feel he’s been doing a good job for us and we’re going to support him to complete it,” Fulani said.

Additional reporting by Frankie Edozien

—

‘I want to thank the Speaker for adopting (a food stamp policy) I proposed in one of my first policy speeches on the