He said that the behavior occurred several years ago.

“My actions have not and will not interfere with the fair administration of justice,” he said. “I continue to strive to be a responsible person and employer.”

The reprimand came almost two years after Chief Justice John G. Roberts Jr. said that the federal court system must do more to protect law clerks and other employees from sexual harassment. Just weeks before that announcement, a judge with the United States Court of Appeals for the Ninth Circuit retired after at least 15 women had accused him of sexual harassment.

In March, the federal judiciary revised its code of conduct for judges and judicial employees to better explain what constitutes inappropriate workplace behavior, according to The Associated Press. The revisions underscored that judges have a responsibility to report misconduct and that retaliating against someone who does so is unacceptable, The A.P. reported.

Judge Murguia’s reprimand appeared to be a rare instance of those revisions in action, said Brooke D. Coleman, a law professor at the Seattle University School of Law. She said courts are not required to publicly report misconduct.

“I wouldn’t say it’s rare in the sense of it’s not happening,” she said. “It’s rare in the sense of we’re seeing it.”

Judge Murguia is the first Hispanic person to be on the United States District Court in Kansas City, according to the court’s website. President Bill Clinton nominated him to the court in 1999.

He grew up in the Argentine community in Kansas City, and graduated from the University of Kansas School of Law in 1982. He then worked on immigration issues at a nonprofit organization in Kansas City from 1985 to 1990, and was a state district court judge there from 1990 to 1999, according to the Federal Judicial Center.