The feds stepped into the fight over the NYPD’s “stop and frisk” policy late last night, urging a judge to appoint an independent monitor if she finds that the department has been illegally targeting minorities for the controversial crime-fighting program.

In an 11 p.m. court filing, the Department of Justice’s Civil Rights Division said the government “takes no position on the fact-dependent first question of whether NYPD’s stop-and-frisk practices violate constitutional standards.”

But it said that if Manhattan federal Judge Shira Scheindlin rules against the cops and orders reforms, “the appointment of a monitor . . . may provide substantial assistance to the court and reduce unnecessary delays and litigation.”

Scheindlin is widely expected to rule against the city after the 10-week nonjury trial at which a dozen minority plaintiffs challenged stop-and-frisk.

She previously found after a related trial that the NYPD “systematically” violated the Constitution when stopping people outside Bronx apartment buildings enrolled in the “Clean Halls” anti-crime program.

In their 21-page “Statement of Interest of the United States,” the feds cite “decades of police reform efforts across the country” during which outside monitors successfully helped address civil-rights complaints.

Court papers note recently closed cases in Pittsburgh and Los Angeles, as well as ongoing efforts in Seattle, Detroit, East Haven, Conn., and the US Virgin Islands.

“In this case, for example, should the court order a remedy, a monitor can assess whether the policies adopted to prevent unconstitutional stops-and-frisks are adhered to in actual practice, and whether any required training is being delivered in a manner that is likely to be effective,” the filing says.

Ten weeks of testimony in the case brought by the Center for Constitutional Rights concluded on May 20.

City officials are worried that the feds’ move will give Scheindlin ammunition to order the toughest remedy.

“I don’t think the judge was going down the road [of naming a monitor]. This gives her the cover to do that,” said one source.

Bloomberg’s office defended the NYPD.

“New York is the safest big city in the country — and that’s thanks to the exceptional professionalism of the NYPD,” mayoral spokesman John McCarthy said last night.

“Their work to cut crime to record lows and take illegal guns off the street has saved thousands of lives, and our administration will continue giving them the support and tools they need to do their jobs and keep New Yorkers safe.”