The 18-year-old gunman who shot a beloved Philadelphia community activist in the head during an attempted carjacking will serve 35 years to life in prison.

Marvin Roberts, who was 16 at the time of the 2017 Spring Garden shooting, pleaded guilty Friday morning to 1st-degree murder, robbery, conspiracy and related charges in the death of 38-year-old Gerald Grandzol. He was given the mandatory minimum sentence under a plea agreement with the Philadelphia District Attorney's Office.

The agreement, which gave Common Pleas Judge Glenn Bronson "trepidation," spares Grandzol's family from a lengthy trial and potential appeals. Anthony Voci Jr., chief of the district attorney's office homicide unit, called it a "knockdown deal" with no future appeals possible beyond the 30 days mandated by Pennsylvania law.

Before accepting the agreement and after hearing more than a dozen statements from Grandzol's loved ones, Bronson urged the victim's family to carefully consider whether they wanted to risk trial in order to seek a greater sentence.

Grandzol's widow, Kristin Grandzol, declined.

"I understand why everyone wants more time, because I do," she said. "I don't want to take any chances. I feel like justice will be served in prison."

Roberts' older brother, Maurice Roberts, was sentenced last month to 25 to 50 years in prison after pleading guilty to 3rd-degree murder, robbery and conspiracy for the shooting. He did not pull the trigger, but carried the gun his younger brother used to shoot Grandzol.

In 2017, just a few months before Grandzol's murder, the Pennsylvania Supreme Court ruled that juveniles should only be sentenced to life in rare cases. Prosecutors must show proof beyond a reasonable doubt that the defendant is an unusual example of someone who can never be rehabilitated.

The U.S. Supreme Court previously ruled in 2012 against mandatory life-without-parole for juvenile offenders. Judge Bronson cited the cases during Roberts' sentencing.

Grandzol was killed in September 2017 outside his home on the 1500 block of Melon Street. He had spent the evening at Fairmount Park with his 2-year-old daughter and the family dog. They played Frisbee while Grandzol's wife stayed home with their 5-week-old baby. She was still recovering from a C-section and had barely slept the night before.

Lurking outside the home were the Roberts brothers. They had plans to rob someone that night, prosecutors said. Marvin Roberts owed money to a drug dealer.

Grandzol pulled into a parking spot as the brothers approached him. They wanted his wallet and car keys. Grandzol complied but asked to retrieve his daughter from the back seat.

"We don't care," Marvin Roberts said, according to prosecutors. Then, he shot Grandzol twice in the head.

His little girl screamed and the brothers took off running towards the nearest SEPTA station. Surveillance video showed them laughing, prosecutors said. Kristin Grandzol recalled hearing the shots, going outside, seeing a man on the ground and hearing her daughter's shrieks.

In court Friday, the widow described seeing her husband's "distorted face, choking on his own blood."

Her daughter "witnessed something that night men who go to war never see," Kristin Grandzol said.

"This is what was happening while the defendants laughed," she said.

Grandzol's death gained considerable attention, in part because of his well-known community activism. One friend said, "Gerry was many things to many people."

"He just wanted to make things better," Gerald Grandzol's sister, Maureen Grandzol Newbury, said during her impact statement. "He had compassion for gentrifying Philly."

Kristin Grandzol and several of her friends and relatives have moved out of the city and into surrounding suburbs, no longer feeling safe in the city her husband loved.

Throughout the Friday hearing, a tale of two Philadelphias emerged. The Grandzol family spoke of backpacking trips, bike rides and barbecues. Grandzol's siblings sobbed as they described their new normal: Anxiety attacks, insomnia and the dwindling health of their mother.

The Roberts brothers lived a very different life. Marvin Roberts had a prior juvenile criminal record, and cut off his ankle monitor sometime before killing Grandzol. His lawyer, Eileen Hurley, described him as a "young man who had a very traumatic, chaotic and neglectful 16 years."

Roberts' guardian at the time of shooting was his 20-year-old sister, who had a child of her own. There was a long history of abuse. Judge Bronson, who received statements from the Youth Sentencing and Reentry Project, said Roberts endured "off-the-scale deprivation" as a child.

"The defendant had a very different upbringing [than Grandzol], which does explain some of his antisocial behavior," Bronson said during sentencing.

Nevertheless, Grandzol's death "has changed the character of the neighborhood," Bronson said. "It's just devastating to the city."