Two police officers were shot, and a third was injured Saturday in Syracuse, New York, as authorities faced off with a gunman who had been "actively firing at police" for more than four hours, forcing residents to evacuate.

The two police officers who were shot, along with the third who was injured, were taken to a local hospital and remain in stable condition, a Syracuse Police Department spokesperson told Fox News Digital. Their families are with them, and they continue to receive medical care and support.

The suspect, identified as Rodney Vanderpool, 55, of Syracuse, is charged with three counts of first-degree attempted murder, second-degree attempted assault, second-degree menacing, fourth-degree criminal possession of a weapon, second-degree criminal possession of a weapon and aggravated cruelty to animals.

Officials said additional charges may be forthcoming.

Authorities said the incident started just after 6 a.m. local time, when police were called to investigate a person stabbing a dog with a machete in a residential area a few minutes south of downtown Syracuse, Syracuse.com executing a subsequent search warrant, Vanderpool allegedly opened fire on responding officers, striking two Syracuse police officers and injuring a third.

Members of the Syracuse Police Department, including the Emergency Response Team, responded to assist, along with personnel from the Onondaga County Sheriff’s Office, New York State Police, Federal Bureau of Investigation (FBI), Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF), and several additional partner agencies.

The scene remained active for several hours as negotiators attempted to communicate with Vanderpool.

Despite repeated efforts to peacefully resolve the situation, he allegedly continued firing upon responding law enforcement officers, the department said.

Nearby residents were evacuated by bus as the incident unfolded.

At about 3:15 p.m., Vanderpool exited the apartment and was taken into custody. 

"The incident on Tyler Court was an extremely dangerous and rapidly evolving one," Syracuse Police Chief Mark Rusin wrote in a statement to Fox News Digital. "Our officers responded to protect this community while coming under gunfire themselves. We are grateful for the bravery shown by responding personnel and for the support we have received from our law enforcement and emergency response partners."

Syracuse Mayor Sharon Owens added she is grateful for the police response.

"I’m grateful for the recovery of our police officers, proud of the men and women of the Syracuse Police Department and thankful to the several law enforcement and emergency services partners who come from all levels of government to manage a dangerous situation in a manner that serves as a model for the nation," Owens said.