CALGARY -- A federal judge has apologized for "rude and insulting" comments he made at a sexual-assault trial where he asked the complainant why she couldn't keep her knees together.

"I was not the good judge I thought I was," said Justice Robin Camp, who was on the witness stand for more than three hours Friday at a hearing before the Canadian Judicial Council.

A five-person panel is weighing whether to recommend his removal from the bench.

Camp, 64, told the panel he regrets his remarks to the young woman, who was 19, during the 2014 trial in Calgary.

"She's a fragile personality. Her background has not been easy. I was rude and insulting. By extension, I have caused unhappiness amongst other people, those who have been sexually abused and I'm sorry for that," he said.

"Canadians deserve more from their judges."

Court transcripts show that Camp questioned the woman --"Why couldn't you just keep your knees together?" -- and told her that "pain and sex sometimes go together."

They also show he called the woman "the accused" throughout the trial, something he did again at the hearing.

"The thing I feel worst about is the questions I asked of the accused," he said before correcting himself. "The complainant."

The panel has heard from the woman, who said Camp's comments led her to contemplate suicide.

"He made me hate myself and he made me feel like I should have done something ... that I was some kind of slut," she told the hearing earlier this week.

Camp acquitted the man accused of assaulting the woman after deciding his version of events was more credible.

The court transcripts also show Camp questioned the woman's morals and suggested she didn't try hard enough to fight off her alleged attacker.

"At some level that I wasn't aware of, I was subject to prejudice ... the prejudice that all women behave the same way and they should resist," the judge said.

"I've let my family down. They have no fault. I have fault, and am particularly sorry for the embarrassment I've caused to my wife and daughter. Despite all of this my family has continued loving me. I am sorry."

Kim Stanton, legal director of the Women's Legal Education and Action Fund, told reporters that apology isn't enough.

"It's much more terrible that the public may have a perception that they will go into a courtroom and a judge won't apply the law," said Stanton, who added the apology won't help the complainant.

"That young woman suffered an awful lot already. The idea that she's now had an apology, I hope gives her some solace, but I know that the damage was already done."

Camp said his notoriety could make it more difficult for him to preside over future cases involving sexual assault or gender. But, he said, if the council allows him to stay on the bench, he will make every effort to avoid past mistakes.

"Certainly in this area ... sex assault ... I know enough to question every question and every thought that I have. I can't guarantee that I'm not prejudiced in other areas, but what I have learned is to be constantly vigilant ... and to ask for help when I need it.

"I was and will always be vigilant ... perfect I will never be."

Closing arguments are to take place Monday.

The panel hearing the complaint against him will forward a recommendation to the full Canadian Judicial Council. The council will then forward its final recommendation to the federal justice minister.