Updated

A Canadian judge who asked a woman why she couldn't keep her knees together after she alleged sexual assault in a trial is resigning from the bench.

Justice Robin Camp said in a statement released by his lawyer on Thursday that he will resign effective Friday.

Camp says he's sorry for the hurt he has caused.

The Canadian Judicial Council recommended Camp be removed from the bench after transcripts from the 2014 trial showed he called the woman "the accused" numerous times and told her "pain and sex sometimes go together" in the original sexual assault trial of Alexander Wagar.

Camp found Wagar not guilty. The Appeal Court ordered a new trial and last month Wager was acquitted again.