Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Chicago police have arrested a man in connection with the shooting death of a Cook county judge in what police described as a "targeted robbery."

Joshua Smith, 37, turned himself in to answer detectives' questions Wednesday and was later charged with first-degree murder and other charges in the death of Associate Judge Raymond Myles, who was shot multiple times outside his home at around 5 a.m. on Monday.

Ballistics evidence matched a gun used in a January robbery where a victim was shot and wounded, and surveillance video captured the license plate of a vehicle seen leaving the scene, Chicago Police Chief of Detectives Melissa Staples said at a press conference.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Joshua Smith. Chicago Police via AP

"The motive of this crime is robbery, which we do not believe is random — nor do we believe Smith acted alone," she said.

A female friend who worked out with Myles had first encountered the gunman on Monday morning. Words were exchanged and she was shot in the leg, police said. Myles was coming to her aid when he was fatally shot, although he was not the target of the robbery, NBC Chicago reported, citing police.

Smith was convicted of armed robbery with a firearm in 2003 and served six years in prison, Staples said.

Staples at Wednesday’s press conference would not say who the target of the robbery was or how many other people may have been involved, citing the ongoing investigation. She said more details could emerge at a bond hearing scheduled for Thursday.

Cook County Associate Judge Raymond Myles in an undated handout photo. Myles, a Cook County judge was killed in Chicago on Monday, April 10, 2017. Circuit Court of Cook County

Asked if Myles' position as a judge is believed to have played any role in the shooting, Staples said investigators don't believe that it did. She called the killing "a senseless crime."

First Deputy Superintendent of Police Kevin Navarro said that "while any act of violence in Chicago is one too many, this incident took from us a valuable partner in the fight to take violent offenders off the streets."

Myles presided over a series of high-profile cases out of Chicago, including parts of the 2008 killing of singer Jennifer Hudson's three relatives.