LANSING, Mich. — The former doctor for the American gymnastics team, Dr. Lawrence G. Nassar, was sentenced to 40 to 175 years in prison on Wednesday for multiple sex crimes, capping an extraordinary seven-day hearing that drew more than 150 young women to publicly confront him and speak of their abuse.

Judge Rosemarie Aquilina, who had opened her courtroom to the young women, including several prominent Olympic athletes, bluntly made clear that Dr. Nassar, 54, was likely to die in prison.

“I just signed your death warrant,” she said as she imposed the sentence.

Given an opportunity to address the court before sentencing, Dr. Nassar apologized to the young women and, occasionally turning to them in the courtroom, said: “Your words these past several days have had a significant effect on myself and have shaken me to my core. I will carry your words with me for the rest of my days.” Several women groaned when he faced them and sobbed as he spoke.