A prosecutor in Southern California has been placed on leave while his office investigates what officials said Monday were “discriminatory comments” he posted on social media that reportedly took aim at Representative Maxine Waters, Michelle Obama, Mexican immigrants and a person killed in a police shooting.

In a Facebook comment, the prosecutor, Deputy District Attorney Michael Selyem, used derogatory terms to describe Ms. Waters — a Democrat who represents a congressional district in Los Angeles — including a vulgar term for part of the female anatomy, and mused that one “would think someone would have shot” her, according to The San Bernardino Sun. On Friday, the newspaper reported the comments and posted screenshots of posts by a person that went by Mr. Selyem’s name.

According to The Sun, Mr. Selyem, a prosecutor with a unit targeting gangs for the San Bernardino County District Attorney’s Office, also wrote that a person who had been shot by the police “got exactly what he deserved,” and referred to the person by a derogatory word. In addition, Mr. Selyem posted an altered photo of Mrs. Obama holding a lewd sign, according to the newspaper; it also said that Mr. Selyem published an online post showing a man in an oversized sombrero accompanied by the words, “Mexican word of the day: Hide.”

By Monday, both Mr. Selyem’s Facebook and Instagram accounts appeared to have been deleted. Multiple attempts to reach him by phone and email were not successful.