Cook County Associate Judge Raymond Myles persuaded his South Side neighbors to install surveillance cameras on their homes. Now those same cameras could help solve Monday’s fatal shooting of the judge, police said.

Police were checking the cameras to see whether they could help identify the gunman. Detectives are considering a variety of motives including robbery — as well as possible links to a beating the judge suffered in 2015 and recent threats that he’d received.

“You have our word that we will not let Judge Myles’ life be lost in vain and we will hold his killer accountable,” Chicago Police Deputy Supt. Kevin Navarro said at a news conference.

Myles, 66, was shot at about 4:50 a.m. outside his home in the 9400 block of South Forest.

Cook County Associate Judge Raymond Myles was shot and killed Monday morning. | Cook County Circuit Court photo

His 52-year-old girlfriend was shot in the leg and taken to Christ Medical Center in Oak Lawn.

A neighbor said he was in his home when he heard a woman outside yelling, “Don’t kill him! Don’t kill him!” Then he heard about five gunshots.

The neighbor went outside and saw the girlfriend lying in the backyard. Myles’ body was on the back porch.

Police said they don’t believe the shootings were random.

Myles’ girlfriend encountered the shooter on a concrete pad between the house and the garage, Chief of Detectives Melissa Staples told reporters. The two “exchanged words” and the woman was shot. The woman didn’t appear to know the shooter, Staples said.

Myles came out of the house in response to the noise.

He and the gunman argued and the man shot Myles multiple times before running away, Staples said. His girlfriend called 911.

Neighbors said Myles and his girlfriend often left the house together early to work out, according to police.

Detectives said they were pursuing “promising” leads, some from the surveillance cameras. The FBI has offered a $25,000 reward, police said.

Investigators say the violent encounter may have begun as a robbery attempt, but nothing appeared to be taken from the house or the victims.

In addition to a holdup, police said they are looking into whether the shootings are connected to recent threats against Myles or an apparent road-rage incident that left him with serious injuries last year.

In September 2015, Myles was trying to park when another driver struck his car. The other motorist allegedly punched Myles in the face when the judge began taking pictures of the damage. Myles reportedly suffered a fractured nose and other injuries requiring surgery.

Deandre Hudson is facing an aggravated battery charge in that case. He’s free on bond, records show.

Police are also looking into a protection order that Myles’ girlfriend took out against a man more than a year ago, sources said.

The resident who heard the gunshots said he’s known the judge for more than a decade since Myles moved to the 9400 block of South Forest in the West Chesterfield neighborhood just north of Roseland.

Myles almost never told anyone on the block that he was a judge, the neighbor said.

“I doubt more than five people on our block know that,” he said.

The man, who asked that his name not be used, said he and Myles sometimes talked about community activism.

“I would relate some of my experiences about having been a teacher. He would share thoughts about where things should go in terms of making a better path for our African-American young men.”

Myles participated in the block club and arranged to have a bouncy house for children at one of their parties. He also persuaded more than a dozen neighbors to join him and install video surveillance cameras on their properties, his neighbor said.

“We need to know that the assailant is caught,” the neighbor said. “We hope the cameras have something to do with it. That would be a silver lining in all of this.”

Navarro called the shootings a “senseless act of violence.”

“Every day civil servants like Judge Myles and those of us in law enforcement work tirelessly to hold criminals accountable and make our streets safer,” Navarro told reporters. “That’s why when incidents like this happen it’s not only a reminder of the ever-present challenge we have of illegal guns and offenders willing to use them, but it’s also a direct attack on the criminal-justice system that keeps our society safe.

At a press conference at Chicago Police headquarters Monday, Chief of Detectives Melissa Staples said the slaying of Cook County Judge Raymond Myles may have begun as a robbery attempt. | Andy Grimm/Sun-Times

Mayor Rahm Emanuel also issued an emailed statement expressing his sympathy and outrage.

“Judge Raymond Myles was a well-respected and long-serving  jurist, and we mourn his tragic loss,” the mayor said.

“The police are continuing to investigate the incident, but what is certain is that a distinguished public servant and pillar of the community was senselessly killed.”

During his almost two-decade career as a judge, Myles presided over several high-profile cases.

In 2008, he ordered William Balfour, the estranged brother-in-law of Oscar-winning actress Jennifer Hudson, held without bail in the slayings of her mother, brother and nephew. Balfour was later convicted.

Myles also presided over pretrial hearings for the two men convicted in the Brown’s Chicken case involving seven people slain in a Palatine restaurant in 1993.

Presiding Criminal Judge Leroy Martin said the news of Myles’ death shocked him and many who knew Myles at the Leighton Criminal Courthouse at 26th and California.

Myles’ court call each day involved youth and drug offenders who landed at the courthouse. The daily influx of mostly young men and people with substance abuse problems was a caseload Myles was passionate about.

“It was important to him, targeting young people and trying to keep them on the straight and narrow and out of the penitentiary,” Martin said Monday morning during an interview in his chambers.

“That gets lost when a lot of people think about what goes on here at 26th Street. He showed a lot of tough love, and I think people responded well on his call.”

Myles, a former Cook County assistant state’s attorney, was selected by the Illinois Supreme Court to fill a vacancy in 1999. In 2001, he was formally appointed as an associate judge.

Outside Myles’ courtroom on Monday, the public was diverted away as assistant public defenders and prosecutors who worked with the slain judge consoled one another. The cases on Myles’ call were transferred to another judge, visitors were told.

One sheriff’s deputy assigned to the courthouse told the Sun-Times that Myles was loved.

“Judge Myles joined the bench with a wealth of experience in law and extensive service to the community. I have always known Judge Myles to be focused and determined in the pursuit of justice, and his conduct earned him the confidence and respect of the people who appeared before him,” Chief Judge Timothy C. Evans said in a statement.

“All of our colleagues at the Leighton Criminal Court Building will miss Judge Myles, who they came to know for his kindness and his impartial administration of justice.”

Ald. Carrie Austin (34th), the powerful chairman of the City Council’s Budget Committee, also bemoaned the judge’s slaying.

“It’s a sad day for us that now we’re starting to lose our judges. I don’t know what the reason was. But for him to lose his life — what was so important to that person that took his life?” said Austin, who made it clear she had no inside information about the motive for the judge’s murder.

Contributing: Jordan Owen and Ashlee Rezin