A 19-year-old Northeast Philadelphia man pleaded guilty Friday to third-degree murder and a weapons charge in the 2017 shooting death of a 16-year-old high school student and was sentenced to 21 to 44 years in prison.

Muhammed Goode of the 2200 block of St. Vincent Street had been charged in October 2017 with murder, two counts of attempted murder, and weapons offenses after a fight among students from rival high schools led to the death of Messiah Chiverton.

Goode, who appeared before Common Pleas Court Judge Rose Marie DeFino-Nastasi, agreed to plead guilty to lesser charges in exchange for a reduced prison sentence. If he had been found guilty in a trial, he could have faced up to life in prison.

“It’s a terrible case," prosecutor Jason Grenell said. “It’s a senseless murder.”

Goode addressed the court after entering his plea, apologizing to the victim’s family and adding, “This was a senseless crime."

“I take full responsibility,” he said. “And I am sorry."

After both the prosecutor and the defendant had described the crime as “senseless,” DeFino-Nastasi said that word “is probably an understatement.”

“What is going on?" she asked. “What is an 18-year-old doing with a 9mm?”

"Rival high schools? That’s been going on forever and a day,” the judge added. “You know what people did? They had fistfights. I don’t know what our society has become that all these young people have guns in hand. I don’t, for the life of me, understand where you all get them. It needs to end.”

Court documents detailed the fatal encounter on the afternoon of Oct. 11, 2017:

Around 4:25 p.m., Goode, then 18, was on a bicycle chasing a group of teens down the sidewalk along the 2100 block of Magee Avenue in Oxford Circle, brandishing a semiautomatic handgun.

Chiverton, a junior at Frankford High School, turned and blocked the sidewalk.

Chiverton and Goode, then a senior at Northeast High School, began scuffling over the weapon. It dropped on the grassy hill in front of a residence.

Goode threw himself onto the hill and groped for the gun as some of the fleeing teens returned. He picked up the gun and shot Chiverton in the head. He fired twice more at the group, but no one else was hit. The group then fled again toward Roosevelt Boulevard.

Police Officer Lorenzo Hardy, driving by Magee Avenue, stopped to break up the fight when he saw Goode fire the handgun, he previously testified.

When he yelled at Goode to stop, the teen turned, looked Hardy in the face, and took off running through a breezeway between houses.

Hardy chased Goode to the 2200 block of Unruh Avenue, where he apprehended him.

Chiverton was taken to Aria Jefferson Health-Torresdale Campus, where he died four days later.

Goode’s mother, Shabree White, previously told the Inquirer that her son had been bullied for weeks by Chiverton and other teens before the shooting. Police previously declined to comment on White’s allegation.