BOSTON >> A Boston police officer shot in the leg Friday after pulling over a known drug dealer is expected to survive, Commissioner William Evans said.

The injured officer boxed in the suspect's vehicle on a side street in the city's Dorchester neighborhood at about 10:30 a.m., knowing that he was on probation after being released from prison in April and was driving on a suspended license, Evans said.

The suspect got out of his vehicle and opened fire "unprovoked" before running away, Evans said. He was caught and tackled by other officers after a short foot pursuit. Police also recovered a gun they think was used in the shooting.

The suspect was identified as 27-year-old Grant Headley. It was not immediately clear when he would be arraigned.

The pursuing officers showed "incredible restraint" in not opening fire on the fleeing man, Mayor Marty Walsh said.

"The leg was bleeding pretty good," Evans said, and the injured officer applied a department issued tourniquet to his own leg.

Tourniquets became standard issue just a few months ago and were requested by officers following the Boston Marathon bombing in 2013, union president Patrick Rose said.

The officer was taken to Boston Medical Center where he was met by his wife. His name was not released. He has been on the force for nine years and is a member of the drug unit.

"I'm grateful we're not here under a worse situation," Walsh said.