BUFFALO, N.Y. — The suspect accused of shooting and killing a man before allegedly firing at Buffalo police officers during a chase last month has been arraigned on murder and weapons charges.

The Erie County district attorney says the actions taken by the two officers in apprehending the man were justified.

Police say Nakeem Haynes, 27, shot Atlas Johnson, 63, on Broadway near Sears Street. According to investigators, when officers spotted Haynes and drove toward him, he jumped onto the patrol car and fired shots through the windshield. The officers were not hit.

That's when police say Haynes fled and officers chased him through several neighborhoods.

The BPD released the body camera footage from the chase.

Authorities say officers eventually were able to subdue Haynes after they shot him.

"They were shot at while sitting in a car and they were also allegedly shot at while they engaged in a foot chase," said Erie County District Attorney John Flynn. "So their actions in shooting the defendant here were justified under the law and as such, they have been cleared of any physical wrongdoing."

The two Buffalo police officers who shot Haynes remain on administrative leave per department protocol. Officials have not said when they will return to duty.

Haynes has been charged with second-degree murder, attempted murder and criminal possession of a weapon, according to police.

He's due back in court next month.