WASHINGTON — President Donald Trump used a ceremony for fallen law enforcement officers on Wednesday to criticize prosecutors in Philadelphia and elsewhere who he asserts don’t go after “criminals who pose a severe threat to public safety.”

Trump pledged to the families of fallen officers that the country will "never, ever leave your side, never disappoint you" but went beyond memorializing for much of the annual event.

He singled out prosecutors in Philadelphia and Chicago as being part of a "dangerous trend" by deciding not to prosecute "many criminals who pose a severe threat to public safety and community well-being." He provided scant context for the claim, and prosecutors in those cities did not immediately respond to requests for comment.

Earlier this year, in announcing a federal indictment in a Philadelphia case, U.S. Attorney William McSwain said that Philadelphia District Attorney Larry Krasner’s policies, including giving “sweetheart deals to violent defendants,” emboldens criminals on the street to "think they can literally get away with murder.”

At the ceremony, the president also renewed his calls for changes to the nation’s immigration laws, citing the shooting death last December of a Northern California police officer, Cpl. Ronil Singh. Trump said the suspect in Singh’s killing could have been kept out with “border security, with the wall, with whatever the hell it takes.” Paulo Virgen Mendoza, suspected of being in the country illegally, has pleaded not guilty in the case.

Trump also made an apparent reference to the case of actor Jussie Smollett, saying that "those who file false police reports should face full legal consequences."

The Empire actor was charged with felony disorderly conduct and accused of making a false police report after claiming he was attacked by two masked men who shouted slurs at him and put a noose around his neck. The Cook County state’s attorney’s office abruptly dropped the charges in March.

The White House did not comment on whether Trump was specifically citing the Smollett case.

The 38th annual memorial service honored 228 peace officers who died in the line of duty last year.

Associated Press writer Deb Riechmann contributed to this article, which also contains information from staff writer Julie Shaw.