The sentence was handed down by Judge James Burke on Wednesday morning, after emotional testimony by the two primary victims in the conviction.

Harvey Weinstein will spend 23 years in a New York State prison after being sentenced by Supreme Court Judge James Burke on Wednesday morning.

Weinstein was convicted Feb. 24 of committing a criminal sexual act in the first degree and third-degree rape.

The sentencing ends Weinstein's New York trial, which began Jan. 6. His team has said they will appeal the jury's decision to convict him on two of the five charges he faced.

Judge Burke, before issuing his sentence, told Weinstein that he will be formally registered as a sex offender.

For his conviction on the first-degree count of criminal sexual act, Weinstein was given 20 years in prison plus five years of supervised release. On the other convicted charge, third-degree rape, he was given three years in prison.

The judge decided to make the sentences consecutive, rather than concurrent.

Weinstein's attorney Donna Rotunno called the sentencing "obscene" in a press conference outside the court house. "Of course it's too harsh. It's ridiculous," she said. "That number was obnoxious. There are murderers who will get out of court faster than Harvey Weinstein will. That number spoke to the pressure of movements in the public, that number did not speak to the evidence that came out in trial. That number did not speak to the testimony that we heard. That number did not speak to evidence, nor did it speak to justice." Added Rotunno, "We were looking for fairness and we didn't get it."

Echoed attorney Damon Cheronis, "He wasn't treated fair at all." Arthur Aidala, another Weinstein attorney, said his client will likely spend his time at the Fishkill Correctional Facility in New York, which he said has a hospital.

Rotunno said that Weinstein's team will likely file their appeal, which she previewed, in July. The team said they didn't know when he would be arraigned on the four charges he faces in Los Angeles County.

Prior to his sentencing, Rotunno had told the judge that Weinstein should get a shorter sentence because he has a "long list of illnesses."

"Mr. Weinstein has a multitude of medical issues, there are lists of things that are physically wrong with him and are serious," said Rotunno, reading a letter highlighting his medical issues. "Mr. Weinstein has a history of heart disease in his family. This is a situation that the loss of freedom ... will affect his ability to get the type of medical care he will need for the list of issues he is dealing with."

Weinstein had spent 10 days in the hospital, where he underwent a heart procedure, after experiencing high blood pressure and heart palpitations following his conviction. Later on Wednesday night, he returned to New York's Bellevue Hospital due to chest pains and where "he will be evaluated and likely will stay overnight."

Before his sentencing, Weinstein — who opted not to testify during his New York sexual assault trial — addressed the judge. Speaking, in a low voice, of the women who have accused him of misconduct, he said, "I have great remorse for all of you. I have great remorse for all women."

He added, "I really feel remorse for this situation. I feel it deeply in my heart."

Lead prosecutor Joan Illuzzi had asked Judge Burke to sentence Weinstein to "the maximum or near the maximum" years in prison, which could have been up to 29 years.

Weinstein's lawyers said that no members of his family attended the sentencing.

Outside the courthouse, attorney Gloria Allred, who represents several of Weinstein's accusers, held up a sign that read: "This Is What Justice Looks Like: 20 + 3 Years."

In response to the sentencing, Tina Tchen, president and CEO of the Time's Up Foundation, issued the following statement: "First and foremost, we are grateful for the courage and strength of Mimi Haleyi, Jessica Mann, Annabella Sciorra, Dawn Dunning, Tarale Wulff, and Lauren Young, who bravely testified in court, and we remain in solidarity with the more than 100 survivors who suffered abuse, harassment, and rape at the hands of Harvey Weinstein. The trauma of sexual assault and harassment is lifelong — we can only hope that today’s sentence brings all of the survivors of Harvey Weinstein some measure of peace."

The statement continued: "We also hope that these women take pride in knowing the impact they have had on our culture at large. Whether by inspiring more survivors to come forward and seek help, changing how the justice system responds to sexual violence, or leading corporate boards to hold more CEOs accountable for toxic workplace culture, the social change catalyzed by these survivors has been nothing short of transformational."

The Silence Breakers — a group of 24 Weinstein accusers that includes Ashley Judd, Lauren Sivan, Rosanna Arquette and Rose McGowan — said in their statement: "Harvey Weinstein's legacy will always be that he's a convicted rapist. He is going to jail — but no amount of jail time will repair the lives he ruined, the careers he destroyed, or the damage he has caused."

Manhattan District Attorney Cyrus Vance thanked the court for "imposing a sentence that puts sexual predators and abusive partners in all segments of society on notice" in his statement. He added, "We thank the survivors for their remarkable statements today and indescribable courage over the last two years. Harvey Weinstein deployed nothing less than an army of spies to keep them silent. But they refused to be silent, and they were heard. Their words took down a predator and put him behind bars, and gave hope to survivors of sexual violence all across the world."

March 11, 5:45 p.m. Updated to include Weinstein's return to Bellevue Hospital.