Newly released surveillance video shows the moment three police officers were shot at as they tried to serve a warrant at a home in North Philadelphia — a situation which escalated into a nearly eight-hour standoff with the suspect and left six officers wounded.

In a video taken from a neighbor's doorbell camera, three officers are seen walking into the home. Soon after they enter the residence what sounds like gunfire erupts.

The scene quickly turns chaotic as a bystander watching from across the street scurries away and several other officers take cover. One of the officers in the home is seen in the video pushing open the front door and crawling down the steps to escape.

Eric Garrity, who lives across the street, told NBC Philadelphia that he went outside to see what was going on but was told by officers to get back inside and seek shelter.

Another neighbor told the outlet that the scene was "like a war."

"The guns, the fire, the noise — it was like bombs going off simultaneously at a time where people are having dinner," the resident said.

Police were at the home in a residential area of the Nicetown neighborhood on Wednesday afternoon to serve a narcotics warrant when the suspect, identified by an attorney as Maurice Hill, opened fire, authorities said.

Two officers who had entered the home were trapped upstairs for hours before they were safely freed along with three civilians, Philadelphia Police Commissioner Richard Ross Jr. said Wednesday night.

The standoff ended early Thursday when the suspect surrendered after police used tear gas. He was then taken into custody. Ross said at a news conference on Thursday that Hill was armed with an AR-15 rifle and had a handgun in his pocket when he was arrested.

Six officers were shot during the standoff and taken to area hospitals with non-life-threatening injuries. By late Wednesday night, they had all been released. Another officer responding to the scene was injured in a crash, police said.

Hill, 36, has not yet been formally charged but could face charges including attempted murder, aggravated assault, conspiracy and "serious" firearm charges, Philadelphia District Attorney Larry Krasner said at a news conference Thursday afternoon.

“There will be a lot of charges,” he said, adding that Hill "may never exit jail."

Wednesday's incident renewed calls for stricter gun control. During a news conference Wednesday night, Philadelphia Mayor Jim Kenney wanted others to do more to keep guns off the street.

"Our officers need help," he said. "They need help with gun control. They need help with keeping these weapons out of these people's hands."

He added: "This government, both federal and state level, don't want to do anything about getting these guns off the street and getting them out of the hands of criminals. ... It's aggravating. It's saddening. It's something we need to do something about."

Hill has been arrested multiple times and has a criminal record dating back to the early 2000s for both state and federal cases, Krasner said Thursday. The charges included burglary, escape, resisting arrest, perjury, robbery and gun and weapon offenses.

Krasner noted that not all of the charges led to convictions.

“I think it’s clear that this man should not have been on streets in the sense that he obviously was a tremendous danger to the public and to law enforcement,” he said, citing Hill's prior run-ins with police.

President Donald Trump made similar comments in a tweet earlier Thursday.

"The Philadelphia shooter should never have been allowed to be on the streets. He had a long and very dangerous criminal record," he said in a tweet. "Long sentence - must get much tougher on street crime!"

Pennsylvania Governor Tom Wolf announced in a statement that he will sign an executive order on Friday to help prevent gun violence by "addressing community gun violence and mass shootings, among others."

CORRECTION (Aug. 15, 2019, 9:20 p.m. ET): An earlier version of this article misstated the number of officers trapped in the house during the standoff. There were two officers and three civilians trapped in the house, not five officers.