In the almost nine months since Chicago police Cmdr. Paul Bauer was fatally shot in the Loop, John Escalante has been unable to bring himself to return to the gravesite of his childhood friend.

Chicago’s onetime interim police superintendent, Escalante traveled Thursday to a federal courtroom in Madison with a simple message for the judge who was about to sentence an unlicensed gun dealer who illegally sold the firearm that killed Bauer.

“I have not gone back since the day we buried him,” Escalante said in emotional, sometimes halting remarks. “I just haven’t had the strength. I’ll go back to the cemetery in the next couple of days. I want to tell him that justice was served today.”

Minutes later, U.S. District Judge James Peterson sentenced Thomas Caldwell, who sold dozens of guns without a license on a controversial website, to about three years in prison.

Caldwell, a Vietnam War veteran diagnosed with schizoaffective disorder, had been warned by federal authorities to stop the illegal gun sales long before the so-called Baby Glock ended up in the hands of a four-time felon charged in Bauer’s slaying in February.

Caldwell, 68, who had described his gun selling to authorities as an addiction, chose not to address the court before his 37-month prison sentence was imposed. But in court papers filed this week, Caldwell’s attorney, friends and family tried to cast him as a sympathetic figure who suffered from mental illness brought on by his service in Vietnam with the Air Force.

READ MORE: The feds were watching, but unlicensed gun dealer was still able to sell Glock that killed Chicago police officer »

But Peterson, presiding in his Madison courtroom, rejected their arguments for probation. He was unpersuaded by the mental illness claims, saying Caldwell had his schizophrenia well under control with medication.

Recalling fond childhood memories of hunting and enjoying guns for sports, Peterson said, “The one thing that was drilled into me was you have to respect the awesome power a firearm represents, that having a gun is an awesome responsibility.”

Escalante had struck a similar theme in his remarks — that there needed to be accountability for Bauer’s slaying.

“That accountability has to be on those who commit the violence and those who put the guns in the hands of people who commit the violence,” he said.

Caldwell had pleaded guilty to selling firearms without a license. But the otherwise routine charge took on special significance after one of the many handguns he sold was connected to Bauer’s shocking daylight shooting in the heart of the Loop on Feb. 13. Shomari Legghette, a 45-year-old felon, is awaiting trial on first-degree murder and other charges in the killing.

The Chicago Tribune reported in March on the gun’s circuitous route to the stairwell outside the Thompson Center where Bauer was slain. The case offers insight into how shadowy gun deals flourish between private owners over the internet — and how easy, lucrative and lethal they can be.

READ MORE: Tracking the ‘Baby Glock’ that killed Cmdr. Bauer: A Wisconsin shop, a gun club and a shadowy sale on the internet »

The Tribune reviewed federal court records detailing how in the hours after Bauer’s death, the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives traced the Glock 26 9 mm to the original owner who bought the firearm in December 2011 at a gun shop in Cross Plains, Wis., a quiet town of about 3,500 people just outside Madison.

In March 2015, the man legally sold the gun for about $350 to Caldwell, a fellow member of the Stoughton Conservation Club, about 40 miles from PT Firearms on the other side of the greater Madison area.

Two years later, Caldwell sold the firearm to Ron Jones, a buyer from Milwaukee whom he’d met on the internet via armslist.com, a popular but controversial site that connects gun sellers with would-be buyers without background checks or other restrictions.

After Bauer’s killing, Jones, 44, was charged with federal weapons and narcotics violations in Milwaukee. He has pleaded not guilty and awaits trial.

Authorities have not said exactly how the gun reached downtown Chicago, but the firearm — often called a Baby Glock because of its compact size — appears to have made its way to the city by the summer of 2017, just about two months after Caldwell sold it to Jones. Shell casings found at the scene of a Loop shooting on July 10 that year were traced to the Glock.

It wasn’t until seven months later that Legghette shot Bauer six times outside the Thompson Center, charges allege. Legghette was taken into custody at the scene in possession of the Glock, authorities have said.

During Thursday’s hourlong court hearing, Peter Moyers, an assistant federal defender representing Caldwell, said Caldwell’s meticulous record-keeping of gun sales shows he was “not determined to hide criminal behavior.”

Rather, Moyers said, Caldwell didn’t have a “grasp” of the seriousness of what he was doing, as proved by his call to the ATF at one point to ask about getting his firearms back.

“He doesn’t understand how much trouble he is in,” he said.

Moyers said Caldwell is a beloved family member who shows kindness to the elderly and disabled but that his reputation has forever been stained by his connection to the death of a high-ranking police officer.

“The digital legacy and knowing that everybody knows … is shame that will punish him forever,” the attorney said.

Federal prosecutors, who argued that he should be sentenced to three to four years in prison, drew a distinction between Caldwell’s conduct and Bauer’s slaying without lessening the danger of his actions.

“Caldwell did not kill Chicago police Cmdr. Bauer, and he should not be held accountable for doing so,” prosecutors said this week in a court filing. “The way Caldwell sold firearms, however, made a tragedy almost inevitable.”

In court, Assistant U.S. Attorney Timothy O’Shea said Caldwell was still culpable for refusing to secure a license to sell guns — and the added responsibilities that such a license would have meant, including requiring background checks.

“He amplified the dangerousness of dangerous people,” he said.

O’Shea also noted that Caldwell was so bold as to keep illegally selling guns even after ATF agents not only sent him a warning letter but also handed him the paperwork he needed to fill out for a license to deal firearms.