Philadelphia gunman Maurice Hill spoke to the city’s police commissioner and district attorney by phone on Wednesday night while he was barricaded inside his house after shooting six cops with an AK-15 military-style rifle, a report said.

“He was concerned he was going to be killed if he came out,” District Attorney Larry Krasner told WHYY’s “Fresh Air,” describing Hill’s side of the bizarre conversation, which he said happened several hundred rounds into the standoff.

The highly unusual conference call between Hill, Philadelphia Police Commissioner Richard Ross and Krasner was patched together by Hill’s defense lawyer, Krasner said Thursday.

“And [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 recounted of Hill.

“Hill, at that time, in my opinion, was in a very animated, excited, frankly, dangerous state,” he said.

The revelation came Thursday, as the US attorney in Philadelphia blamed the jeering mob that taunted cops during the shootout on the left-leaning Krasner’s “new culture of disrespect for law enforcement.”

The mob was caught on video shoving cops, cursing at them, and even appearing to hurl objects at them.

Krasner said Thursday that Hill’s attorney Shaka Johnson — whom he knew from their days together working criminal cases — reached out to him at 9 p.m. the night before, as Hill was surrounded by hundreds of cops and SWAT officers.

By the time the commissioner was patched in, “People [were] just trying to appeal to him about why he even had a reason to live … talking about his daughter significantly … there was a newborn,” the commissioner told the radio station.

The two law enforcement officials declined to give further details of the phone call.

But at one point — because Hill wanted to see Krasner on the street before he would surrender — the DA arrived at the scene with a police escort, the report said.

“They kept us off the block but we were nearby,” Krasner told the station. “Mr. Johnson was on the phone, on speaker, with Maurice Hill as he exited the property.”

The shootout left six cops with non-life threatening injuries.