ST. PAUL, Minn. (AP) —  A Minnesota judge won't dismiss the case against a police officer who killed a black man during a July traffic stop.

Judge William Leary III ruled Wednesday that it's fair and reasonable to allow the case against St. Anthony Police Officer Jeronimo Yanez to go to trial.

Yanez is charged with manslaughter and other counts. Authorities say he shot and killed 32-year-old Philando Castile after Castile told him he was armed. Castile's girlfriend was in the car with him and streamed the shooting's aftermath live on Facebook.

Yanez's attorneys argued that Castile's own negligence exonerated Yanez. But Leary says a victim's unreasonable conduct is never an absolute defense to a criminal charge.

A hearing where Yanez is expected to enter a plea is set for Feb. 27.