(CNN) Barricaded inside his home, surrounded by SWAT teams in an hourslong standoff in Philadelphia, suspect Maurice Hill called the one person he felt he could trust.

His former defense attorney.

"Uncle, I need your help," Hill told Shaka Johnson, who told CNN that "Uncle" is a term of endearment he hears from many of his clients.

Hill was looking for a way to end the standoff. He didn't want to die, Johnson said. And that eventually led to a four-way phone call that also included the Philadelphia district attorney and the police commissioner -- a call that ended only when Hill stepped out of his house with his hands up.

'They're going to kill me'

Hostage negotiators had already tried for hours to talk with Hill. Since the shooting began at 4:30 p.m. ET Wednesday, six officers had been shot and wounded. But Hill didn't want to talk to law enforcement, Johnson said, so he called his former attorney at 8:30 p.m. ET

"It was clear to me that he wanted this thing to end without him dying," Johnson said, "because he kept saying, 'They're going to kill me.' That was his issue, so I tried to address that issue."

Johnson offered to call District Attorney Larry Krasner . "He said, 'Yeah, call him on the phone.' So I did. I called him on a three-way call."

That was at 9 p.m., Krasner told reporters Thursday. Johnson explained that he'd been on the phone with the person inside the house for hours and was trying to arrange for a peaceful end to the standoff.

The suspect in a Philadelphia shooting, Maurice Hill, surrenders early Thursday.

"Mr. Hill was expressing concerns that he might be killed if he came out," Krasner said. "Concerns about what would happen to him when he came out, including the future in terms of any possible case."

Krasner said Hill was "in a very animated, excited, frankly dangerous state" emotionally.

"He seemed to be on the one hand reaching out to someone to try to end the situation without being killed," Krasner said. "But on the other hand, he seemed to be a man who probably at the other end was holding a gun, who as far as I knew still had hostages in the building and needed to be brought to a calmer place."

Krasner said he and Johnson were trying to "lower the volume, to bring more calm about, to get him to a more rational position."

Four-way phone call

The district attorney then called Police Commissioner Richard Ross Jr., Johnson said, and it became a four-way phone call.

"Everybody had their own agenda, quite frankly," Johnson told CNN. "You had a politician on the phone, you had the chief of police on the phone who has ... six police officers shot and wounded on that same day. You have a defense attorney on the phone, and then the man who feels like a rabid squirrel who's caged on the phone.

"So it was a very interesting dynamic, quite frankly. But the overall tenor of things was, we all three want you to come out safely and surrender yourself," Johnson said.

Johnson said he reminded Hill that he is father to a baby girl and teenage boy and that he had to stay alive for their sakes.

"We talked about the fact that (his son) would have access to social media and internet for years to come, and he would be watching his dad killed by the police," Johnson said. "We talked about his three-day-old daughter that he'll never get to hold again, who will never know her dad."

Just after midnight -- nearly eight hours after the shooting began, and nearly four hours after Hill called Johnson -- Hill put down the phone and surrendered.

"He was on speakerphone with me as he was giving himself up," Johnson said. "Because I asked him to put his phone down. I don't want the police to mistake the phone for something else, so I said, 'Put your phone down,' and I had him on speaker as he was raising his hands shouting, 'I'm coming out.'"

Heart-stopping surrender

Ross agreed to let Krasner and Johnson go to the scene, still on the phone with the suspect, Krasner said.

"They kept us off the block, but we were nearby and Mr. Johnson was on the phone, on speaker with Maurice Hill as he exited that property and as he turned himself in without there being any further gunfire," Krasner said.

But Johnson said his "heart stopped" as Hill emerged and the energy was palpable. The SWAT officers waiting for the suspect to come out had just seen six police officers be wounded, he said, and "there was a little bit of adrenaline still rushing" hours later.

Both the DA and Johnson refused to take any credit for the surrender, emphasizing it was the police department that did the work of getting Hill to come out.

Asked whether it was improper for the district attorney -- whose office will eventually prosecute the suspect -- to be negotiating the person's surrender, Krasner said the whole situation was unexpected.

"Let me put it this way. Is it what I was hoping for? No," Krasner said. "I don't think the police commissioner was hoping to speak to this individual, either."

He continued, "We all react to the situation we have. I did not pick up a phone that said to me 'shooter.' I didn't even know the name Maurice Hill. I picked up a phone that said 'Shaka Johnson,' and next thing I knew we were in a three-way. That's the reality. So we do the best we can."