After a three-month investigation, the Queens district attorney has decided not to bring criminal charges against a police officer who was accused of assaulting a State Supreme Court justice on the street in what the judge contended was an unprovoked attack, officials said Wednesday.

The episode, which occurred just after midnight on June 1 as a crowd watching two officers subdue an unruly homeless man became increasingly restive, was the subject of what District Attorney Richard A. Brown called “an extensive and thorough investigation.”

In a statement, Mr. Brown said his office “has concluded that the facts do not warrant the filing of criminal charges” because “there is insufficient evidence of criminality to support a charge that the police officer acted with the intent to injure or that physical injury (as defined by statute and case law) occurred.”

The judge, Thomas D. Raffaele, 69, who hears matrimonial cases and has been on the bench since 2006, said that he was “very shocked” and “very disappointed” by the decision. He criticized the investigation by the district attorney’s office.