A 28-year-old man who police say fired a gun at officers in the city’s Mayfair section after a car chase Thursday evening has been charged with multiple counts of attempted murder and related offenses, the Philadelphia District Attorney’s Office said Friday.

Tajan Durham was apprehended after he tossed his semiautomatic handgun onto the roof of an OfficeMax on Roosevelt Boulevard near Cottman Avenue and then tried to hide under a car, prosecutors said.

During the execution of a search warrant of the black Jeep Cherokee Trailhawk that Durham was driving, police recovered another handgun, bullets, and a bulletproof vest, prosecutors said.

There were no injuries reported, police said.

Court records show Durham pleaded guilty to robbery in Montgomery County and was sentenced in 2018 to prison. He also served prison time in 2013 after he pleaded guilty to drug dealing in Philadelphia.

Around 5:20 p.m. Thursday on the 6800 block of Ditman Street in Tacony, officers spotted the Jeep, which was suspected of involvement in several robberies, and then saw a man enter the vehicle and drive away, police said.

Police pursued the vehicle to the 3100 block of St. Vincent Street, where Durham is alleged to have fired several shots at the officers while continuing to flee, prosecutors said.

Near the OfficeMax at 7231 Roosevelt Blvd., the Jeep came to a stop after becoming stuck between two metal barriers. Durham exited the Jeep and fired eight additional rounds at the four officers who had been in pursuit, as well as two additional officers who arrived on the scene, prosecutors said.

Durham is charged with six counts each of attempted murder, aggravated assault, firearms violations, and related offenses.

District Attorney Larry Krasner said in a statement: “This incident posed tremendous danger to the community, and it is a credit to the training and professionalism of Philadelphia Police that they were not physically harmed and that Mr. Durham was taken into custody without a single shot fired by our officers, no injuries to the defendant, and no physical harm done to nearby drivers, passengers, and pedestrians.”