A man was sentenced Tuesday to more than 37 years in prison for fatally shooting a 9-year-old Minnesota girl as she was jumping on a trampoline with friends.

D'Pree Shareef Robinson, 20, pleaded guilty in March to second-degree murder in the 2021 death of Trinity Ottoson-Smith, the Minneapolis Star Tribune reported. He later tried unsuccessfully to withdraw the guilty plea.

LAS VEGAS MAN GETS NEARLY 30 YEARS FOR ROLE IN ST. PAUL BAR SHOOTING

A criminal complaint said Trinity died in a gang-related drive-by shooting. The trampoline in a backyard was in the line of fire between Robinson and intended targets, the Hennepin County Attorney’s Office said.

DPree Robinson

D'Pree Robinson has been sentenced to over 37 years behind bars for the fatal shooting of nine-year-old Trinity Ottoson-Smith. (Glen Stubbe/Star Tribune via AP, Pool)

The shooting in May 2021 was among three that summer in which children were struck in Minneapolis.

EXPELLED MINNESOTA DEMOCRAT’S SON SUSPECT IN HIT-AND-RUN CRASH THAT KILLED 5 MUSLIM WOMEN

Several relatives and friends of Trinity attended the sentencing hearing. Her father and stepmother read letters from siblings and Trinity's best friend, Avayla, whose birthday was being celebrated when Trinity was shot.

CLICK HERE TO GET THE FOX NEWS APP

"I don’t have my best friend. Instead she’s above me," Avayla’s letter read.