LANSING, Mich. -- The former sports doctor who admitted molesting some of the nation's top gymnasts for years under the guise of medical treatment was sentenced Wednesday to 40 to 175 years in prison by a judge who proudly told him, "I just signed your death warrant."

The sentence capped a remarkable seven-day hearing in which more than 150 women and girls offered statements about being abused by Larry Nassar, a physician who was renowned for treating athletes at the sport's highest levels. Many confronted him face to face in the Michigan courtroom.

"It is my honour and privilege to sentence you. You do not deserve to walk outside a prison ever again. You have done nothing to control those urges and anywhere you walk, destruction will occur to those most vulnerable," Judge Rosemarie Aquilina said.

Nassar's actions were "precise, calculated, manipulative, devious, despicable," she said.

When the hearing ended, the courtroom broke into applause. Victims and prosecutors embraced at the conclusion of the grueling 16-month case.

But the anguish of the past week will have little, if any, practical effect on Nassar's fate. Before serving the Michigan sentence, the 54-year-old must first serve a 60-year federal sentence for child pornography crimes. With credit for good behaviour, he could complete that sentence in about 55 years. By then, he would be more than 100 years old if still alive.

He is also scheduled to be sentenced next week on more assault convictions in Eaton County, Michigan.

A prosecutor called Nassar "possibly the most prolific serial child sex abuser in history" and said competitive gymnastics provided the "perfect place" for his crimes because victims saw him as a "god."

Prosecutor Angela Povilaitis also said Nassar "perfected a built-in excuse and defence" as a doctor, even though he was "performing hocus-pocus medicine."

"It takes some kind of sick perversion to not only assault a child but to do so with her parent in the room, to do so while a lineup of eager young gymnasts waited," Povilaitis said.

She urged people to believe young victims of sexual abuse no matter who they accuse and praised journalists, including those at the Indianapolis Star. The newspaper's 2016 investigation of how the sport's governing body handled sexual abuse allegations against coaches prompted a former gymnast to alert the paper to Nassar.

Although Nassar's work with gymnasts received the most attention, the allegations against him spanned more than a dozen sports over 25 years.

At one point, Nassar turned to the courtroom gallery to make a brief statement, saying that the victims' accounts had "shaken me to my core." He said "no words" can describe how sorry he is.

"I will carry your words with me for the rest of my days" he said as many of his accusers wept.

The judge then read from a letter that Nassar had written to her that raised questions about whether he was truly remorseful. The victims who packed the courtroom gasped as they heard passages that included "Hell hath no fury like a woman scorned" and another in which Nassar said the "stories" about him were fabricated.

He also defended his actions with the athletes as "medical, not sexual."

"I was a good doctor because my treatment worked, and those patients that are now speaking out were the same ones that praised and came back over and over, and referred family and friends to see me," Nassar wrote.

One of the first athletes to publicly accuse Nassar of sexual assault was the last victim to offer a statement at the hearing.

Rachael Denhollander is a Kentucky lawyer who stepped forward in 2016 after the sport's governing body, USA Gymnastics, was accused of mishandling sexual assault complaints. She said Nassar groped and fondled her when she was a 15-year-old gymnast in Michigan.

Denhollander's statements to Michigan State University police put the criminal investigation in high gear in 2016.

"You have become a man ruled by selfish and perverted desires," she told Nassar, who worked at the university and USA Gymnastics, which also trains Olympians.

Hours after the sentencing, MSU President Lou Anna Simon said she was resigning amid mounting pressure over the way the university handled the Nassar case. That came shortly after Michigan lawmakers voted overwhelmingly for a nonbinding House resolution that sought her removal over allegations that the school missed chances to stop Nassar.

Nassar pleaded guilty to assaulting seven people in the Lansing area, including in the basement of his home and at his campus office. But the sentencing hearing was open to anyone who said they were a victim.

Accusers said he would use his ungloved hands to penetrate them, often without explanation, while they were on a table seeking help for various injuries.

The accusers, many of whom were children, said they trusted Nassar and were in denial about what was happening or were afraid to speak up. He sometimes used a sheet or his body to block the view of any parent in the room.

Several elite former gymnasts talked about how Nassar won their allegiance with candy, Olympic trinkets and encouraging words while they were under constant scrutiny from demanding coaches.

The judge praised the victims who appeared in her court, calling them "sister survivors." The women included Olympians Aly Raisman, Jordyn Wieber and McKayla Maroney.

The judge also called for a broader investigation into how the abuse was allowed to go on for so long. She said justice "requires more" than what she can do.

The CEO of the U.S. Olympic Committee soon announced an independent inquiry. Scott Blackmun said the third-party investigation will attempt to determine "who knew what and when."

Brooke Hylek, a gymnast who plans to compete in college, heaped scorn on Nassar.

"I cannot believe I ever trusted you, and I will never forgive you," she said Tuesday. "I'm happy you will be spending the rest of your life in prison. Enjoy hell by the way."

Associated Press Writer Ed White in Detroit contributed to this report. AP Sports Writer Larry Lage in East Lansing also contributed.