The Philadelphia man accused of shooting six police officers demanded to speak to his lawyer, the DA and the city’s police commissioner before ending an eight-hour standoff, for fear that he would be shot on sight, officials said.

“He was concerned he was going to be killed if he came out,” District Attorney Larry Krasner said on NPR show ‘Fresh Air’, recalling his phone call with the suspect Maurice Hill. Authorities say this conversation happened after Hill gunned down six cops with an AK-15 semiautomatic rifle.

READ MORE: Chicago woman killed by gunfire as she used her body to shield her baby girl from bullets

Around 9 p.m. Wednesday, while Hill was barricaded in his home, defense lawyer Shaka Johnson patched her former client into a call with Police Commissioner Richard Ross and Krasner.

“He had concerns about what was going to happen to him if he came out in the future, in terms of any possible case,” Krasner explained Thursday. “Hill, at that time, in my opinion, was in a very animated, excited, frankly, dangerous state.”

The D.A. also lashed out at the mob of irate residents who taunted and threw things at the police during the shootout, calling their behavior a “new culture of disrespect for law enforcement.”

READ MORE: Ohio shooter said to have wrestled with dark thoughts

Following the call assuring him he’d make it to the police station alive, Hill, 36, finally surrendered and walked out of the home with his hands in the air. But to Kasner’s point, video of that moment show crowds of people outside the home heckling police and pelting them with random objects.

CBS Philadelphia confirmed Hill’s demands were met and he was not injured during the standoff. All of the officers injured during the shootout have been released from the hospital.

“Maurice called me in a panic, obviously” Johnson told the station. “He did not want this to end violently and he really was sort of taking an opportunity to speak his peace. I told him ‘You gotta surrender, man.’ ”