The Governor George Deukmejian Courthouse in Downtown Long Beach. File photo.

A Los Angeles man was sentenced to 40 years to life in prison for the shooting death of 21-year-old Imani Keith, whose body was found inside a home in North Long Beach four years ago.

Before 26-year-old Rodney Scott would learn his sentence Thursday morning, Keith’s mother, Ebony Cunningham, stood up in court and demanded he look at her.

“Rodney, you took the life of my daughter,” she said, fighting back tears. “But you took your life, too.”

Cunningham and three other of the victim’s relatives spoke in court about the tremendous pain they have suffered from the moment they found out Keith had been shot, and every time they were forced to visit Long Beach for court proceedings, describing the city as a dark place amid a sunny beach.

“After four years of agonizing, we can finally have peace,” said Kania Long, reading from a statement written by Keith’s younger sister.

Scott was convicted of second-degree murder earlier this month after pleading no contest two days into jury selection, according to the Los Angeles County District Attorney’s Office. In California, second-degree murder carries a 15-year penalty, but in Scott’s case, it was doubled to 30 years due to a prior conviction, according to the DA’s Office.

According to the DA’s Office, Scott also admitted using a firearm in the commission of a felony or attempted felony, which carries a penalty of up to 10 years in prison.

It is not clear why Scott changed his plea after originally pleading not guilty and preparing to go to trial. His attorney declined to speak with the Post.

Authorities said that just after midnight on June 28, 2018, officers received reports of gunfire coming from the 700 block of Via Wanda, which is part of the Carmelitos Housing Project near Orange Avenue and 52nd Street.

Upon arrival, officers found Keith inside a residence suffering from a gunshot wound to the head.

Emergency personnel rushed her to a local hospital, but she died hours later.

Scott was already in custody at a correctional facility in Northern California when in March 2019, police pointed to him as the shooter in Keith’s death.

At the same time, police said Scott was also identified as a suspect in a 2018 residential burglary in Los Angeles. Search warrants across several locations in LA believed to be associated with Scott led to the discovery of a gold Rolex watch that officers believed was stolen during the burglary.

He was transferred to Long Beach City Jail and charged with murder, along with six counts of burglary, and one count each of attempted burglary, possession of a firearm by a prohibited person, and knowingly receiving, buying or taking property from another person. However, the charges related to the burglary were ultimately dismissed, court records show.

Police also took five others into custody in connection to the crime, including helping Scott avoid prosecution in the months after the shooting, although only four—Dana Moore, Richard Scott, David Thomas and Nyla Hall—would face charges.

Moore ultimately had the charge for helping Scott avoid prosecution dismissed and instead pleaded no contest in 2019 to possession of a firearm by a prohibited person. She was sentenced to 32 months in state prison.

Richard Scott was sentenced in 2019 to 16 months in county jail after pleading no contest to helping Scott avoid prosecution.

David Thomas was sentenced in 2019 to three years in prison, 180 days in county jail and three years probation after pleading no contest to helping Scott avoid prosecution. He also faced a burglary charge but it was dismissed, court records show.

Nyla Hall pleaded guilty to burglary and aiding Scott following the murder. Details on her sentencing were not immediately available.

A restitution hearing has been scheduled for Dec. 8 where a judge will determine how much Scott will have to pay back to the victim’s family.

Girlfriend of stabbing spree suspect says he was in a mental health crisis