A man has been charged with attempted murder after a Philadelphia police officer was shot and wounded near a SEPTA bus Thursday.

Walter Farrell, 54, is being held without bail, reports WPVI.

The district attorney's office said Farrell was unlawfully carrying a firearm at the time.

Officers boarded the bus just before 10 a.m. because they had noticed a man matching the description of someone who reportedly fired a gun in the area in an earlier incident.

When confronted, the suspect exited the bus and began firing on officers and the two officers returned fire, police said.

Officer Donald Revill, 37, arrived on the scene to help and got into a struggle with Farrell. At some point he was shot in the arm.

Revill was treated and released from the hospital.

According to the Philadelphia Inquirer, Farrell was struck multiple times and transported to a nearby hospital in critical condition.