PHILADELPHIA (CBS) — A gunman was taken into custody after he allegedly shot six Philadelphia police officers in the city’s Nicetown-Tioga section on Wednesday. The suspect surrendered to police shortly after midnight, following more than a seven-hour standoff.

Police have identified the alleged gunman as 36-year-old Maurice Hill.

Daylight shows investigators on scene of shootout in Nicetown-Tioga section that left 6 @PhillyPolice officers shot, all expected to survive, suspect now out of hospital, in custody@CBSPhilly pic.twitter.com/Pv46UlRI9W — Chantee Lans CBS Philadelphia (@ChanteeLans) August 15, 2019

#UPDATE on #PhiladelphiaShooting: Attorney for suspect Maurice Hill confirms he is not injured after a more than 7 hour standoff with @PhillyPolice — Greg Argos (@GregArgosCBS3) August 15, 2019

Shaka Johnson, an attorney for the suspect, says Hill was not injured in the shootout. However, Hill was taken to the hospital for a checkup and released around 3 a.m. Eyewitness News was there as officers escorted him out.

His lawyer tells CBS3 Hill called him to the scene of the standoff while he was barricaded inside.

“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 CBS3’s Greg Argos.

Johnson says he first received a call from Hill around 8:30 p.m., hours after the shooting broke out and the officers were shot.

Attorney for suspect Maurice Hill speaks about #Phillyshooting https://t.co/05AKmsfebR — Greg Argos (@GregArgosCBS3) August 15, 2019

Hill has not been formally charged, but on Thursday the district attorney said attempted murder, aggravated assaults and multiple weapons charges are likely.

All six police officers were released from the hospital Wednesday night. A seventh officer, who was injured in a car crash while responding to the scene on the 3700 block of North 15th Street, remains in the hospital. That officer’s condition is not known.

#UPDATE on #PhiladelphiaShooting: Attorney for suspect Maurice Hill confirms he is not injured after a more than 7 hour standoff with @PhillyPolice — Greg Argos (@GregArgosCBS3) August 15, 2019

It all started around 4:30 p.m. when police were serving a narcotics warrant when the suspect opened fire. Johnson says he does not know at this time if Hill was the target of that warrant.

‘Give Me SWAT ASAP’: Chaotic 911 Call Reveals Moments Shots Fired At Police In Philadelphia’s Nicetown-Tioga Section

As police exchanged gunfire inside the house, officers escaped through windows and doors. Philadelphia Police Commissioner Richard Ross said that it was a miracle officers weren’t killed during the incident.

CBS3 reports 30 officers discharged their weapons during the shootout. Volleys of gunfire erupted throughout the evening as the gunman continued to fire at police.

“Let’s be clear, the police did an awesome job today. They were very patient, this had been going on for hours,” Johnson said. “Commissioner Ross could have pushed a button long before he did, quite frankly. So I want to give credit to the police for having some sort of patience with all of this … This could have gone very badly earlier in the day.”

Sources tell CBS3 the suspect was live-streaming some of the shootout while he barricaded himself inside the home. However, Hill’s lawyer disputes those claims.

WATCH: CBS3 Cameras Capture Volleys Of Gunfire Erupting After 6 Philly Police Officers Shot In Nicetown-Tioga

Two officers, who were trapped on the second floor of the residence, were released, along with three hostages, while police say the gunman remained on the first floor.

Additionally, two women and two children were escorted by SWAT and Philadelphia Police from the scene. They told CBS3 that they were inside the home on the second floor at the time of the shootout and that police saved them.

During a news conference on Thursday, Ross said the gunman had a handgun and a military-style AR-15 rifle.

“There are a lot of unanswered questions because the crime scene is still fluid,” Ross said. “Just prior to me getting here, we still were not able to gain access because when you use tear gas it still remains inside for a long time. So I can’t even tell you what additional weapons he may have had beyond what we know.

“We know that he had one handgun, that believe it or not, he had in his pocket when he came outside and surrendered,” Ross said.

‘They Don’t Deserve To Be Shot At’: Philadelphia Mayor Jim Kenney Gives Plea For Gun Control After 6 Police Officers Shot

Chopper 3 was over the scene where earlier in the day, police could be seen taking another suspect into custody. It’s not clear what his role was in the incident.

Temple University issued a lockdown as the situation developed and children at two nearby day care centers were moved to safe locations.

The shooting and massive police presence shut down large portions of North Philadelphia and disrupted SEPTA routes.

Police activity in the area has Erie Avenue closed between Broad Street and Hunting Park Avenue on Thursday morning. Broad Street, between Hunting Park Avenue and Allegheny Avenue, has since reopened.

Many road closures still in place in North Philly for ongoing police activity this morning. @SEPTA BSL has resumed normal service but several bus routes are still on detour. @CBSPhilly pic.twitter.com/dob24AAF5V — Chandler Lutz (@ChandlerCBS3) August 15, 2019

SEPTA says the Broad Street Line service has resumed but bus routes 23, 53, 56, H and HX will remain detoured until further notice.

For updated SEPTA information, click here.

Rte 16,23,53,56,H,XH: These routes are expected to be detoured through the evening due to police activity in the area. Visit System Status for more information. http://system%20status/ — SEPTA (@SEPTA) August 15, 2019

CBS3’s Greg Argos and Cleve Bryan contributed to this report.