As police seek a second suspect in the killing of a man walking his dog in Brewerytown last week, authorities said Tuesday they were investigating why the accused gunman — already facing charges of carjacking and an assault on a jail guard — was released from custody two weeks before the murder.

During a news conference about the Jan. 13 slaying of Milan Loncar, authorities faced questions about the series of events that allowed Josephus Davis to go free on Dec. 29. That sequence involved judges dramatically lowering bail for Davis in two separate cases; prosecutors saying they are not sure if they had appealed those rulings; and no record of probation officials, prosecutors, or judges taking steps to try to keep him detained for potentially violating his probation on previous robbery convictions.

“I’m sure that many balls were dropped in this case, and that will be looked at,” Assistant District Attorney Joanne Pescatore said at a news conference at Police Headquarters.

The case came as gun crimes in the city continued at a troubling rate, with authorities reporting 27 homicides in the first 18 days of 2021.

It also quickly became contentious and political. Many who have long criticized District Attorney Larry Krasner as too lenient — including the police union, some police officials, and Krasner’s opponent in May’s primary election, Carlos Vega — blasted the DA for his office’s handling of the case.

And it caused police officials to address questions from reporters about why they were able to quickly solve a homicide in which the victim was white, when most of the investigations into slayings this year and last year — in which the majority of the victims were Black — remain unsolved.

Homicide Capt. Jason Smith denied that race played a factor in how zealously detectives investigate cases, saying they are always guided by physical evidence, video, and witness statements. In this case, he said, police had half a dozen credible tips from the public — in addition to video of the crime — when many others suffer from a lack of witness cooperation.

“We work every single homicide the same exact way,” Smith said. “We don’t work any harder on cases just involving white decedents.”

Loncar, a Wayne native who graduated from Temple University in 2019, was shot just before 7 p.m. on Jefferson Street near 31st, according to police. He was approached by Davis and another man while walking his dog, according to Smith. When both men started reaching toward Loncar’s pants pockets, Loncar sought to push away the gun Davis had brandished, and Davis shot him once in the chest, Smith said.

The two men ran away, according to video that captured the crime. Police officers found Loncar still clutching his dog’s leash when they arrived at the scene.

Davis was arrested later that night, when Highway Patrol Officers stopped a car at B Street and Indiana Avenue in Kensington in connection with a carjacking from the day before.

Four men fled, but officers captured Davis, who was driving, and connected him to the homicide through surveillance video. He lived on the 1400 block of North Hollywood Street, just two streets away from Loncar.

Davis — whose first and last names were initially reversed by mistake by police and in court records — was charged with Loncar’s murder and is being held without bail. Smith said a second man, described as a person of interest, has also been identified in the killing, but he declined to identify him and said he has not yet been charged.

Court records show that Davis had a history of recent arrests. In 2019, he was charged with two robberies: one that occurred on Jan. 8 of that year, the other for an incident on Oct. 1, 2019, in which Davis and several alleged coconspirators were accused of stealing $140 from someone on the 4200 block of North Broad Street.

Davis pleaded guilty to both crimes on Jan. 29, 2020, according to court records, and was sentenced to six to 12 months in jail plus two years’ probation.

A month after he was sentenced, court records show, he was charged with a carjacking from seven months earlier, in July 2019. In that case, according to court documents, Davis and another man approached an Uber driver with a gun and stole his car, initially driving the victim around while holding him at gunpoint in the backseat.

Davis’ bail in that case was set at $100,000, according to court records.

In September 2020, while still in custody, Davis was charged again, this time over accusations that he sprayed an “unknown substance” — possibly bodily fluids — at a guard in a city jail through a hole in his cell door.

His bail in that case was set at $200,000, court records show. The records do not show any indication that the probation department sought to lodge a detainer against Davis for the new charges. Doing so could have kept Davis in custody for violating the terms of his probation for his past robbery convictions. There is also no indication that prosecutors filed a motion asking the judge overseeing Davis’ probation to consider lodging a detainer.

Sources say court officials were investigating whether the fact that Davis was in jail — and not yet reporting to a probation officer — contributed to the lack of a detainer being lodged.

In October 2020, when court records say Davis’ preliminary hearing in the assault case was delayed because the courthouse was closed, Municipal Court Judge Charles Hayden agreed to lower Davis’ bail to $12,000 at his lawyer’s request. Court transcripts show prosecutors objected to the reduction. Hayden did not explain his decision except to say it was at “the high end” of the bail guidelines.

Two months later, Davis’ bail was reduced in the carjacking case at the request of another lawyer representing him. By that point, court records show, Davis’ preliminary hearing for the carjacking had been postponed eight times, often due to coronavirus-related restrictions.

Municipal Court Judge Teresa Carr Deni, according to a transcript, said Davis was “practically serving the sentence” as his case dragged on, and agreed to lower his bail to $20,000 — slightly over the guidelines, and again over the prosecutor’s objection.

Prosecutors have the option to appeal such bail rulings in Common Pleas Court. Pescatore, of the DA’s Office, said Tuesday that the office was unable to say whether it had done so. Court dockets show no record of any such appeals.

On Dec. 29, Davis was able to post bail and secure his release, paying 10% of $20,000 on charges of motor-vehicle theft and kidnapping, and 10% of $12,000 on charges including aggravated assault on a prison guard.

He is accused of fatally shooting Loncar on Jan. 13.

Staff writers Julie Shaw and Craig R. McCoy contributed to this article.