Former Canadian Justice Robin Camp.

Canadian Federal Court Justice Robin Camp, who sparked outrage at a 2014 rape trial when he asked the alleged victim why she couldn’t keep her knees together, is resigning from the bench.

“I would like to express my sincere apology to everyone who was hurt by my comments,” he said in a statement released by his attorney. The resignation is effective from Friday, reported The Washington Post.

Camp presided over the sexual assault trial of Alexander Wagar, accused by a 19-year-old woman of having raped her over a sink at a house party. “Why didn’t you just sink your bottom down into the basin so he couldn’t penetrate you?” he asked her at the time. He also kept referring to the alleged victim as “the accused” and suggested that “pain and sex sometimes go together.”

The resignation follows a report released Thursday by the Canadian Judicial Council calling for his removal. After a 15-month review, the council found that Camp’s conduct was “manifestly and profoundly destructive of the concept of impartiality, integrity and independence.” Camp’s announcement followed shortly after the publication of the report.

Frank Addario, Mr. Camp’s lawyer, argued in a submission before the council earlier in the year that his client’s behavior “was the product of ignorance, not animus.” Camp also said he underwent counseling in July and had become a more empathetic person. Nevertheless, the council wrote that public confidence had been “sufficiently undermined to render the judge incapable of executing the judicial office.”

According to The UK Telegraph, this is the third time in its history that the judicial council has recommended a judge be removed from the bench. In all three instances, the judges have resigned before being unseated.