We support our Publishers and Content Creators. You can view this story on their website by CLICKING HERE.

The gunman who shot and injured a New York Police Department (NYPD) officer was castigated by a judge and given a multi-decade prison sentence on Monday.

Devin Spraggins, 24, was convicted of attempted murder after opening fire at an officer on a city bus in April 2023. Spraggins was fighting with a bus passenger when he wounded Officer Brett Boller, who entered the bus to respond to the altercation.

FOX 5 New York reported that Spraggins was sentenced to 39 years to life in prison on Monday. While handing down the sentence, Judge Kenneth Holder censured Spraggins while the gunman stayed silent, according to the New York Post.

“For me, the defining moment in this case was not that you shot Police Officer Boller in the leg,” Holder said, according to the Post. “It’s that you, not knowing the magazine had fallen out of the gun and while watching Police Officer Boller on the ground screaming in pain, you pointed your gun at him and you pulled the trigger.”

NYPD COMMISSIONER’S BROTHER IS EX-COP BEING PROBED AS ALLEGED ‘FIXER’ FOR NYC CLUBS: REPORT

Devin Spraggins outside of court

Devin Spraggins was given a 39-year-to-life sentence on Monday. (FOX 5 New York)

“You effectively tried to execute him,” the judge added.

Holder also told Spraggins that Boller and other NYPD officers work around the clock to protect all New Yorkers, including criminals.

“And here’s the irony,” the judge added. “That day and any other day, Police Officer Boller and Police Officer Rock would have risked their lives to save any of your four sisters, your brother, even you.”

HOUSE GOP PRESSES HOCHUL ON ALLEGED CCP AGENT’S INFLUENCE IN NEW YORK, INCLUDING SECRET CHINESE POLICE STATION

Split image of Spraggins' face, hands

Devin Spraggins was identified from a tattoo on his hand with the name “Jocelyn,” police say. (NYPD)

“But you tried to kill him. You didn’t give a damn about his life.”

Boller had been an officer for less than a year when Spraggins shot him in the right hip. After the shooting, Spraggins fled the scene in a Lyft and Boller was taken to a hospital in stable condition.

According to New York officials, the shooting began when Spraggins acted aggressively toward another passenger on the bus.

CLICK HERE TO GET THE FOX NEWS APP

NYC police officer shot

Officials said the shooting happened at around 3:30 p.m. in Jamaica, Queens, after an MTA driver flagged down two police officers and told them there were two men involved in a dispute involving a bus seat. (Citizen App)

“He gets on the bus. He says to [a] male sitting there, ‘Why are you staring at me? Get out of my seat.’ There’s some pushing and some altercations as the bus is proceeding,” NYPD Chief of Detectives James Essig said at the time. “That’s when the bus driver sees our officers on the street, flags them down, and that’s when the incident then takes place.” 

Fox News Digital’s Greg Norman contributed to this report.