Alex Kozinski, a high-profile federal court judge in California, is retiring after multiple women accused him of sexual harassment, prompting a formal inquiry.

In a statement on Monday, Mr. Kozinski, 67, said his family and friends had urged him to remain and defend himself, but that doing so would make it difficult to do his job well.

“I cannot be an effective judge and simultaneously fight this battle,” he said in the statement. “Nor would such a battle be good for my beloved federal judiciary. And so I am making the decision to retire, effective immediately.”

Citing a “broad sense of humor and a candid way of speaking to both male and female law clerks alike,” Mr. Kozinski, who served on the United States Court of Appeals for the Ninth Circuit for 32 years, also offered an apology to his accusers.