Mayoral candidate Christine Quinn dealt a blow to Police Commissioner Ray Kelly and his stop-and-frisk policies during a televised mayoral forum last night.

The City Council speaker previously has said she’d wants Kelly to stay on board as commissioner if she’s elected.

But when asked about stop-and-frisk last night, she said she would fire Kelly if he didn’t reduce the NYPD’s use of the controversial program.

“I have said that I think whoever the next mayor is would be lucky to keep Ray Kelly,” she said during the NY1 debate.

“But if I’m mayor, Ray Kelly will be offered that job with the clear charge, you get stops-and-frisks down, you only do them constitutionally. If you can’t agree to that, don’t take the job, and if you take it and you don’t do it, you’ll get fired,” she added.

She was responding to a moderator’s question about stop-and-frisk — a practice many of her Democratic primary opponents have criticized.

Quinn has tried to walk a tightrope on the issue — saying she would retain the popular police commissioner — while also passing legislation in the coming weeks to create an inspector general to oversee the NYPD.

No other Democrat has promised to keep Kelly, and the top cop has not said whether he would accept Quinn’s offer.

“I find it astounding that Speaker Quinn, with a straight face, can say that she thinks Ray Kelly will bring down the level of stop-and-frisks,” said Dem rival Bill de Blasio, the public advocate.

“The [council] speaker is adding meetings next week for the sole purpose of passing the bill. Political thinking is behind it,” said Vallone, chair of the Public Safety Committee.

“Virtually everyone subject to a police action will be given an automatic right to the court,” Vallone said, citing the “disparate impact” provision of the legislation, which targets the NYPD’s stop-and-frisk tactics.

That means people can sue the city if they can show that a higher percentage of their protected class — based on race, gender, age or other factors — was stopped than their overall percentage of the city’s population.

“The only way to stop that would be to stop women 50 percent of the time. Otherwise, every NYPD action would end up in state court,” Vallone said.

He applauded the NYPD captains union for a hard-hitting newspaper ad that was revealed exclusively in yesterday’s Post.

“How effective is a police officer with a blindfold on?” the ad asked, showing a photo of Captains Endowment Association President Roy Richter standing with his eyes covered in Times Square.

The legislation would handcuff cops by preventing them from using race, ethnicity and other identifying factors when describing criminal suspects, critics say.

The result would be a return to the staggering crime rates of previous decades and an avalanche of discrimination lawsuits.

The bill’s sponsor, Councilman Jumaane Williams (D-Brooklyn), and Quinn plan to bypass the normal legislative process and bring the measure directly to a full council vote because Vallone was going to let it die in his committee.

“I will soon have the dubious distinction of being the first chair in the City Council who the speaker has gone around. I refuse to be part of this process that will absolutely result in blood in the street,” Vallone said.

Williams yesterday defended the bill, arguing it would not stop cops from using descriptions of race, age, disability or gender.

“It says they can’t use those descriptions by themselves,” he said. “It’s very, very narrowly tailored to one specific thing.”

But Richter and others insisted that the law could be interpreted differently by a judge or juries.

“We’ve been told it’s not the intent to prevent [the use of] those descriptions but it’s not the intent we’re worried about,” he said.

GOP mayoral candidate Joe Lhota also harshly criticized the bill — and Quinn — for bypassing the Public Safety Committee.

“It’s about time we start speaking truth to the stupidity coming out of the City Council. This bill represents a present and clear danger to all New Yorkers,” Lhota said. “This is exactly why [Quinn] shouldn’t be in City Hall.”

“The speaker is manipulating legislation for personal gain, selling the security of all New Yorkers for votes in the upcoming election,” Palladino said.

And PBA President Pat Lynch also piled on.

“The proposal claims to protect the rights of innocent citizens but will instead protect the criminals by making it much more difficult for police to arrests them,” Lynch fumed. “It is a politically driven piece of garbage legislation that will cost lives and bring crime and disorder back to the city.”

A rep for Quinn said she will vote against the bill but believes it deserves a vote since Vallone refused to hold hearings.