A man who opened fire inside a crowded Atlanta restaurant after a robbery victim refused to give up his watch was sentenced Thursday to 40 years in prison.

Thaddeus Todd pleaded guilty to 31 charges, including criminal attempt to commit murder, armed robbery, aggravated assault with a deadly weapon, participation in criminal street gang activity and possession of a firearm by a first offender probationer, a spokesman for the Fulton County District Attorney’s Office confirmed.

Police said Todd opened fire at JCT Kitchen and Bar in west Midtown in August 2017 when a man he tried to rob outside ran into the business.

The man was standing in the parking lot with his wife when Todd tried to rob him at gunpoint, Atlanta police spokesman Carlos Campos said previously.

The victim, Bruno Bafico, was shot in the stomach and leg. He fled into the restaurant and Todd pursued him, firing until his gun jammed.

RELATED: Robber chases, shoots man inside crowded Midtown restaurant

Todd fled the scene, but investigators were able to link him to multiple high-end armed robberies in which he took Rolex watches, a Versace necklace, a Louis Vuitton bookbag and a white Mercedes-Benz, police said.

MORE: Man arrested in JCT Kitchen shooting suspected in high-end robberies

Todd was hesitant to agree to a 40-year-prison sentence Thursday afternoon, but eventually accepted the state’s deal, Channel 2 Action News reported. Under the agreement, he will be eligible for parole after serving at least half his sentence.

Surveillance video from the restaurant showing Bafico crawl away as Todd pursued him and continued firing was played in court during the hearing.

“I don’t think that anybody that saw this video would think the person standing over a man and shooting at him in a crowded restaurant should ever walk free again,” Fulton Superior Court Judge Craig Schwall said.“I give out mercy every day and I have compassion, but this is just not one of those cases that I think is appropriate for mercy or compassion."

Bafico’s wife said her husband hasn’t been the same since the incident.

“This man shot at my husband multiple times. My husband ran inside, and he just kept shooting and shooting,” Leidy Delgado told Channel 2. “My husband is not the same. Mentally, physically — he’s just not the same.”

Channel 2 investigative reporter Mark Winne was inside the courtroom Thursday as the alleged shooter, Thaddeus Todd, went in front of a judge.