CONCORD, N.H. — A Wakefield man convicted of sexually assaulting a 7-year-old girl has again been sentenced to six years in prison nearly three years after a judge changed his mind about imposing a harsher punishment.

Joshua Baud was sentenced in September 2014 to 7½ years for the 2006 assault. But his case sparked outrage and set in motion a sentencing saga after Carroll County Superior Court Judge David Garfunkel said days later that he had reconsidered and wanted to impose a lighter sentence of six years.

“After much soul searching,” he said, he decided he had not balanced the goals of sentencing: punishment, deterrence and rehabilitation.

After prosecutors objected, the state Supreme Court twice ruled that Garfunkel had the authority to revise the sentence, and sent the case back to him. But Garfunkel has since retired, so the new sentence was issued Friday by another judge.

Judge Amy Ignatius said had Garfunkel not reached the state’s mandatory retirement age, he would have heard the case, and there was no doubt that he would have imposed the revised sentence. Given that she didn’t preside over the trial, observe witnesses or hear arguments at sentencing, Ignatius said she would not substitute her judgment for his.

Baud’s attorney, David Rothstein, called the ruling a sound decision that accurately reflects Garfunkel’s thinking and properly imposes the sentence he wanted.

The attorney for the state, Sean Locke, did not immediately return a call seeking comment Friday.

At a hearing in 2014, the victim’s mother argued against the lighter sentence, saying Garfunkel’s change of heart had her daughter reliving painful memories of the assault.

“This has had a big backlash on my daughter,” the woman said at the time.

“She was hoping for it to be over.”