PHILADELPHIA (CBS)— Authorities have taken a man armed with an AR-15 into custody after a search in Bensalem and northeast Philadelphia.

The incident began when police responded to reports of shots fired on Townsend Road in Philadelphia on Wednesday afternoon.

Police say an officer observed a man armed with an AR-15-style rifle upon arrival to the scene.

After repeated requests to put the gun down, police say the man did not comply—eventually putting the truck in reverse, forcing the officer to jump out of the way during his escape, police tell CBS3.

The suspect was tracked to an area in Bensalem where investigators say his truck jumped a curb and got stuck in a ditch.

The man was later arrested after fleeing his vehicle.

Police say they recovered an AR-15 style rifle with two magazines, one of them wasn’t full. Authorities also recovered an Uzi semi-automatic weapon. The man, who is not being identified, has an extensive criminal history, police said.

It’s unclear what prompted the initial gunfire.