Police are on the hunt for a gun-toting thug who shot and wounded a police officer in North Philadelphia during a foot chase early yesterday, police said.

Officer Kevin Gorman was shot in the shoulder after he chased a Nasuil Martinez, 20, who had fled from a vehicle that had been stopped for speeding, police said. Gorman was treated at Temple University Hospital and released.

At 2:35 a.m. Gorman, 33, and his partner were heading westbound in a marked police cruiser on Allegheny Avenue when they spotted a 1998 dark gray Grand Marquis speeding in the opposite direction, said police spokesman Lt. Ray Evers.

The officers turned around and got the vehicle to stop on Westmoreland and Hope streets. That's when a man in the rear-right-passenger side fled from the car, Evers said.

Gorman pursued the man, who ran a short distance before jumping over a fence on Howard Street near Westmoreland, while Gorman's partner detained the three other passengers who had stayed in the car.

Just as Gorman was about to hop over the fence, the man fired two shots from a .45-caliber gun. One round passed through the top of the officer's shoulder, Evers said. The thug managed to get away. The remaining passengers in the car were questioned but not arrested, Evers said.

"This could have been a very tragic situation," said Evers.

Gorman, a three-year veteran with a wife and two children, is at home resting, Evers said. Gorman is the second Philadelphia police officer to have been shot this year.

Officer Kevin Livewell was shot in the leg in July when gunfire erupted in Kensington after he and his partner stopped a van that fit the description of a vehicle involved in an earlier shooting. The assailants immediately opened fire.

Anyone who might know where to find Martinez, of Lee Street near Somerset, should contact the Homicide Unit at 215-686-3334 or call 911.