MINNEAPOLIS — A Minnesota judge on Friday sentenced Derek Chauvin to 22½ years in prison for the murder of George Floyd, a Black man whose desperate gasps for air beneath the knee of the White officer captured on a viral video changed the American conversation on race and justice.

Chauvin, who was fired after the killing and convicted by a jury in April on charges of second-degree unintentional murder, third-degree murder and second-degree manslaughter, had faced up to 40 years in prison.

In rendering his sentence, Hennepin County District Judge Peter A. Cahill, who oversaw Chauvin’s trial, offered brief remarks, saying it was not the time to be “profound or clever” from the bench. He said he had based the sentence on the facts of the case and not “public opinion.”

“The sentence is not based on his emotion or sympathy. But at the same time, I want to acknowledge the deep and tremendous pain that all the families are feeling, especially the Floyd family,” Cahill said. “You have our sympathies, and I acknowledge and hear the pain that you’re feeling.”

The killing on May 25, 2020, captured on a gruesome Facebook video, shook the nation and forced a painful reckoning on issues of race and police brutality that continues to play out across a divided America. Chauvin’s conviction, a rarity in a country roiled by multiple high-profile cases of Black people being killed by police, was praised by Floyd’s family and activists as a historic moment of justice and a potential sign of change.

Before the sentencing, Floyd’s 7-year-old daughter, Gianna, spoke in a small, singsong voice of how her daddy used to help her brush her teeth and play with her. “I miss him,” she said.

A woman off-camera asked Gianna if she wished her father were still alive. “Yeah, but he is,” Gianna said.

“Through his spirit?” the woman asked.

“Yes,” the little girl replied.

In the courtroom, Chauvin, who sported a freshly shaved head and wore a light gray suit, appeared to watch the video, occasionally blinking but otherwise unemotional. As three other Floyd family members approached a podium inside the socially distanced courtroom, the former officer turned his head to listen to them speak but otherwise had no reaction.

Brandon Williams, Floyd’s nephew, asked the judge to sentence Chauvin to the maximum punishment. “Although Chauvin will be sentenced today and spend time in prison, he will have the luxury of seeing his family again, talking to them,” Williams told the court. The Floyd family had been “robbed” of that luxury, he said. “No more birthday parties, no graduations, holiday gatherings … No opportunities to simply say I love you.”

The family members were not allowed to address Chauvin directly, but Floyd’s brother, Terrence, looked toward him and posed questions that have flummoxed even those who know Chauvin. Why? What were you thinking? What was going through your head when you had your knee on my brother’s neck when you knew he posed no threat anymore?” he said, as tears rolled down his face.

Philonise Floyd, who testified at the trial and who has become the public face of the family’s push for justice, told the court of the anguish of having to relive his big brother’s death again and again through the video of his killing, of the “nightmares” he has on a regular basis.

“I have had to sit through each day of Derek Chauvin’s trial and watch the video of George dying for hours, over and over again for an entire year,” he said. “I had to relive George being tortured to death every hour of the day … not knowing what a good night’s sleep is.”

Shortly before being sentenced, Chauvin approached a court lectern and spoke briefly, offering his condolences to the Floyd family. But he declined to speak at length, citing other “legal matters” he is facing. He did not apologize for his role in Floyd’s death.

“I do want to give my condolences to the Floyd family,” Chauvin said, briefly glancing back toward Floyd’s siblings and nephew. “There’s going to be some other information in the future that would be of interest. And I hope things will give you some peace of mind.”

Before Chauvin spoke, his mother, Carolyn Pawlenty, appealed to Cahill for leniency, describing her son as a “selfless” public servant who had always tried to help others. She said prosecutors and the media had depicted her son as an “aggressive, heartless and uncaring person … a racist.”

“I can tell you that is far from the truth,” Pawlenty said. “My son is a good man.”

She pleaded with Cahill to consider a lesser sentence, arguing that if her son was sentenced to a long prison term she and Chauvin’s father — her ex-husband — would probably die before he is released. “When you sentence my son, you will be sentencing me,” Pawlenty said.

Both Pawlenty and Eric Nelson, Chauvin’s attorney, said the former officer had played the events of May 25 over and over in his mind. Nelson, who said his client had not been scheduled to work that day but came in because the department was short staffed, said Chauvin was consumed by the questions of “What if, what if, what if?”

Chauvin’s sentence made him only the second police officer in Minnesota history to be jailed for an on-duty murder and one of fewer than a dozen officers nationwide.

Unlike the scene two months ago when crowds across Minneapolis erupted in jubilation to Chauvin’s conviction, reactions to Cahill’s sentencing decision ranged from disappointment to even anger among activists who had gathered outside the Hennepin County Government Center, where the hearing was held. “Nothing has changed,” a woman yelled.

Speaking to reporters after the hearing, members of the Floyd family, their attorney, Ben Crump, and civil rights leader Al Sharpton appeared to agree, saying they wished Cahill had given Chauvin the maximum sentence allowed.

“This is the longest sentence they’ve ever given, but this is not justice,” Sharpton said. “Justice is George Floyd would be alive. Justice is if they had done sentences like this before, maybe Chauvin would have thought he would have not gotten away with it.”

“One sentence does not solve a criminal justice problem,” Sharpton added.

But Crump argued Chauvin’s sentence had the “opportunity to be a turning point in America.” “What we got today was some measure of accountability,” Crump said. “[But] there are still federal charges pending … and we are holding out for the maximum.”

An attorney for Chauvin, who has been held in solitary confinement at a state prison near the Twin Cities since his April 20 conviction, had argued that he should get probation, while prosecutors sought at least 30 years, pointing to the irreparable harm his actions had on Floyd, the victim’s family, witnesses, the community and even the nation.

“We’re not looking for revenge. We’re looking at the seriousness of what happened,” Minnesota Attorney General Keith Ellison (D), whose office is overseeing the prosecution of Chauvin and the other three officers implicated in Floyd’s death, said ahead of the hearing.

Ellison pointed to Judeah Reynolds, who was 9 when she and her cousin Darnella Frazier, then 17, happened upon the scene of Floyd being restrained by Chauvin and the other officers. Both girls testified against Chauvin, with Frazier speaking of her fear of Chauvin and the enduring trauma and guilt she feels over not being able to save Floyd.

“What do you expect a 9-year-old child to grow up thinking about the police? What do you think people looking at the video think of the police? How much damage has been done to the trust that needs to exist between the police and the community?” Ellison said. “He murdered a man, but he also murdered trust.”

Though the jury found Chauvin guilty on all three counts he was facing, Minnesota law dictated that he would face sentencing on only the most serious count — second-degree murder. State sentencing guidelines on that charge recommend 11 to 12 years in prison for someone with no criminal history.

But last month, Cahill ruled that prosecutors had proven there were aggravating factors in the case that called for a tougher sentence.

In a presentencing memo filed this month, prosecutors asked Cahill to sentence Chauvin to 30 years in prison — about 10 years shy of the maximum sentence for second-degree murder in Minnesota — which they argued would “properly account for the profound impact” of his conduct on Floyd, his family and the community.

“No sentence can undo the damage [Chauvin’s] actions have inflicted,” prosecutors wrote. “But the sentence the court imposes must hold (the) defendant fully accountable for his reprehensible conduct.”

But Nelson, Chauvin’s attorney, had pressed Cahill to “look beyond” his previous ruling and consider his client’s background, including his lack of criminal history and “the unusual facts of the case.” In a memo filed to Cahill, Nelson said Chauvin was the “product of a ‘broken’ system” — though he did not elaborate.

Delving into his client’s personal background for the first time, Nelson wrote that Chauvin had “struggled to find passion for a particular career” and had eventually decided to become a police officer, a job he held for nearly two decades.

“Mr. Chauvin was unaware he was even committing a crime,” Nelson added. “In fact, in his mind, he was simply performing his lawful duty assisting other officers in the arrest of George Floyd.”

Nelson said Chauvin had the strong support of his family and had received “thousands of letters of support … from local and international communities.” He appealed to Cahill on humanitarian grounds, writing that Chauvin had been “preliminarily diagnosed with heart damage” and had a shorter life span because of his years as an officer.

He argued that his client was likely to be a “target in prison” and argued a “stringent probationary sentence” would be more appropriate, but Cahill rejected that argument.

“Part of the mission of the Minneapolis Police Department is to give citizens ‘voice and respect,’ ” Cahill said in a written order of Chauvin’s sentence. “Here, Mr. Chauvin, rather than pursuing the MPD mission, treated Mr. Floyd without respect and denied him the dignity owed to all human beings and which he certainly would have extended to a friend or neighbor.”

The sentence granted Chauvin credit for time he has already served — 199 days — which includes the time from when he was jailed in May 2020 to when he was released on bail in October 2020. He was jailed again April 20, following his conviction. According to state sentencing guidelines, Chauvin will probably serve less than 15 years, with the remainder of his sentence to be served on supervised release.

Chauvin is expected to appeal his conviction and sentence. He is also facing other legal jeopardy related to Floyd’s death, including federal charges.

Chauvin and the other officers at the scene — J. Alexander Kueng, Thomas K. Lane and Tou Thao — were indicted last month on federal civil rights charges related to Floyd’s death. Chauvin was also indicted on a second federal charge alleging that he violated the civil rights of a 14-year-old by hitting him with a flashlight and kneeling on him during a 2017 arrest. Though no federal trial date has been set, all four officers are scheduled to appear in U.S. District Court in September for a formal arraignment.

Meanwhile, Chauvin and his ex-wife, Kellie, are scheduled to appear before a state judge Wednesday on felony tax evasion charges. The couple are accused of failing to report nearly $500,000 in income — including payments Chauvin allegedly received while doing off-duty police security. The couple have not entered in a plea in that case, which was delayed because of Chauvin’s murder trial.

Sentences for police officers convicted of killing people while on duty vary widely, according to data tracked by Philip M. Stinson, a criminologist at Bowling Green State University.

Police are rarely charged for killing people on duty, and convictions are even less common. According to Stinson’s data, 11 officers — including Chauvin — have been convicted of murdering someone while on duty since 2005, with sentences ranging from more than six years in prison to a life sentence.

Mark Berman contributed to this report.