Maurice Hill, 36, shot six officers and barricaded himself inside his Philadelphia home with two hostages Wednesday night

The Philadelphia gunman who shot six officers spoke to the city's police commissioner while he barricaded himself in his home in an eight-hour standoff.

'He was concerned he was going to be killed if he came out,' District Attorney Larry Krasner told WHYY's Fresh Air, of Wednesday night's phone conversation between him and Maurice Hill after gunning down six cops with an AK-15-style rifle.

The call between Philadelphia Police Commissioner Richard Ross, District Attorney Krasner and Hill was patched together by Hill's defense lawyer from a previous crime, Shaka Johnson, around 9pm while Hill was surrounded.

'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 said. 'Hill, at that time, in my opinion, was in a very animated, excited, frankly, dangerous state.'

This came to light Thursday as Krasner slammed the mob who taunted and pelted the cops during the shootout, calling it a 'new culture of disrespect for law enforcement.'

During the standoff Hill called his lawyer who patched a call with Hill, Philly Police Commissioner Richard Ross and District Attorney Larry Krasner

Krasner revealed Thursday that during the call Hill expressed that he 'was concerned he was going to be killed if he came out', pictured is an image from the standoff showing officers with guns drawn

Shocking video and photos show crowds taunting cops and throwing things at them as they were responding to the shooter. Krasner slammed the mob who taunted and pelted the cops, calling it a 'new culture of disrespect for law enforcement'

Hill, 36, finally surrendered after eight hours and was taken into custody after he walked out of the home with his hands in the air.

But that wasn't before video caught crowds outside the home taunting police and throwing things at them as they were responding to the shooter.

People can be seen shouting in the faces of cops and lunging at officers stationed at the edge of the active shooting scene as they try to keep people away from the gunfire.

One photo shows the people gathered outside a Philadelphia home as the police battled the AK-47 wielding gunman.

'A major moment of disappointment this evening was watching a crowd of people taunt police officers, laughing and yelling at them in the midst of the gunfire,' tweeted CBS3 reporter Alexandria Hoff early Thursday morning.

According to CBS 3, Hill, who has a lengthy history of gun convictions, was not injured during the standoff. His lawyer Shaka Johnson said the suspect called him around 8.30pm.

'Maurice called me in a panic, obviously. 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,"' Johnson told the news station.

It was then that Johnson connected the calls to talk Hill down.

After an eight-hour standoff, Hill surrendered and was taken into custody (pictured being detained)

Authorities said the shooting began around 4.30pm as officers went to a home in a north Philadelphia neighborhood to serve a narcotics warrant in an operation 'that went awry almost immediately', Philadelphia Police Commissioner Richard Ross said.

Ross said many officers 'had to escape through windows and doors to get (away) from a barrage of bullets'.

'It's nothing short of a miracle that we don't have multiple officers killed today,' Ross said.

The six officers who were struck by gunfire have been released from hospitals, Gripp said. Two other officers who were trapped inside the house for about five hours after the shooting broke out were freed by a SWAT team shortly after 9.30pm.

One of the six injured officers, a father-of-two, suffered a graze wound to the head. Two other officers were also injured in a car accident while responding to the shooting. All of the officers were either transported to Temple University Hospital or Einstein Medical Center.

About 30 minutes later, three people that officers had taken into custody in the house before the shooting started were also safely evacuated.

The incident follows a string of mass shootings in California, Texas and Ohio in which gunmen used similar semi-automatic rifles.