Rabbi Barry Freundel was sentenced to six and a half years in prison Friday for videotaping dozens of nude women at a ritual bath.

“You repeatedly and secretly violated the trust your victims had in you, and you abused your power,” Senior Judge Geoffrey Alprin of DC Superior Court said at the sentencing. Alprin also fined Freundel more than $2,000.

Prosecutors had sought 17 years after Freundel, 64, the former spiritual leader of a prominent Washington Orthodox synagogue, pleaded guilty in February to 52 counts of misdemeanor voyeurism. Freundel’s lawyers sought community service. Each count carried a maximum penalty of one year in prison and fines of $1,000 to $2,500.

Freundel was given 45 days for each of the 52 counts. He will serve the sentences successively, amounting to nearly six and a half years.

More than a dozen of the some 150 women Freundel filmed spoke during the hearing, some with voices breaking and others in tears. Before he was sentenced, Freundel told the judge he was “disgusted” by his actions, calling what he did “reprehensible.”

“I’m sorry. I’m truly sorry,” he said.

Freundel, 63, acknowledged as part of a plea agreement in February that from 2009 to 2014, when he was arrested, he secretly recorded women in a showering and changing area of The National Capital Mikvah in Washington, a ritual cleansing bath he worked to have built.

Freundel’s attorney Jeffrey Harris had argued that any sentence longer than a year would be illegal. Each of the counts was punishable by a year, and the law required them to run concurrently, Harris argued. The judge disagreed, but Harris said after the hearing that he plans to appeal and called the sentence “harsh.”

The women who spoke during the hours-long hearing described a range of emotion from bouts of depression to nightmares. Some said Freundel’s actions have made them wary of locker rooms or dressing rooms. One woman said she avoids looking at pictures of her wedding because Freundel officiated at it.

“I feel tainted and dirty by what Rabbi Freundel did,” said one. “How could I have been so foolish?” said another. “Please protect us from this man,” one told the judge.

Other women spoke to Freundel directly. “Why? How could you do this to me?” one woman asked, saying he had turned her “life upside down.” Another woman told him: “I forgive you.”

The Associated Press does not identify victims of sex crimes. However, one of the victims who has been vocal and used her name, Emma Shulevitz, said after the hearing that the sentence was “a good long time.”

Before one of Freundel’s recording devices was discovered in October and he was arrested, Freundel had led the Kesher Israel synagogue in Washington for 25 years and was particularly sought out by people who wanted to convert to Orthodox Judaism.

Some of the women Freundel videotaped were women whose conversion to Judaism he was supervising. He also invited female students from classes he taught at Towson University in Maryland and Georgetown University’s law school to visit and use the mikvah for the sole purpose of recording them, prosecutors said.

Freundel acknowledged as part of his plea agreement that he used recording devices hidden in a clock radio, a fan and a tissue box holder. In some instances he used up to three recording devices to capture women from different angles. His recordings captured women undressing, using the toilet and entering and exiting a shower, prosecutors said.

Freundel was fired from the synagogue about a month and a half after his arrest. In court Friday he said he was relieved when he was arrested and that he has been trying through therapy to understand his actions. He blamed his actions in part on “childhood degradation” that has “haunted” his life. He did not elaborate.

“I recognize that I created something of a phobia about a place that should be sacred and I’m sickened by that,” he said.