Two Philadelphia police officers are recovering after being shot on the job early Sunday morning, and the man accused of shooting them is in critical condition.

It all started around 2:30 a.m. Sunday, when officers responded to a call of shots fired and pursued a suspect's vehicle for a couple of miles before the suspect allegedly rammed into their patrol vehicle at the intersection of Frankford Avenue and Welsh Road during an attempted traffic stop, before exiting and opening fire on their cruiser, the Philadelphia Police Department said.

One officer was struck in the ankle and a bullet grazed him in the head. The other officer suffered a grazing wound to his nose. 

"Yet again, our brave @PhillyPolice officers have come under fire in service to our city," Interim Philadelphia Police Commissioner John M. Stanford, Jr. said on X. "While we are grateful that they will physically recover from their gunshot wounds, I ask that you keep our two officers, their families, and their coworkers in your prayers."

FORMER PHILADELPHIA UNION BOSS, CODEFENDANT CONVICTED OF EMBEZZLING OVER $650K IN FUNDS

Philly PD investigates double officer shooting

A Philadelphia police investigator looks at bullet holes left behind after officers and a suspect exchange gunfire. (FOX 29 Philadelphia)

When two additional officers arrived at the scene, all four opened fire on the suspect, who police identified as a 40-year-old man. The suspect was struck during the shootout, police said, according to local FOX 29.

The two officers shot were taken to a hospital and are expected to recover. 

"We are very blessed and lucky to be able to know that they're going to recover from this incident physically," Stanford said during a news conference. He added that this is the second time one of the officers has been shot on the job.

"Having to be involved in something like this again after returning and, you know, from the first ordeal, again, you shouldn't have to deal with this, you know. But that's the oath that they swear to in terms of protecting and serving," Stanford said.

SUSPECT CHARGED WITH MURDERING SECURITY GUARD INSIDE PHILADELPHIA MACY'S AFTER DEADLY STABBING

Philly PD Interim Commissioner John M. Stanford, Jr.

Interim Philadelphia Police Commissioner John M. Stanford, Jr. held a press conference about the shootout. (FOX 29 Philadelphia)

Philly PD two officers hurt scenr

Philadelphia police cruisers can be seen at the scene of an early Sunday morning shootout that left two officers injured. (FOX 29 Philadelphia)

CLICK HERE TO GET THE FOX NEWS APP

Both injured officers are a part of Philadelphia PD's highway patrol unit. 

The suspect, who has not yet been identified, reportedly has multiple prior criminal offenses. Police said a firearm was recovered from him following the shootout.