A Boston police officer is recovering from a gunshot wound to the leg after he was struck while patrolling the South End yesterday afternoon. Two people are under arrest.

The injured officer was a member of a Boston Police Youth Violence Strike Force patrol team patrolling West Springfield Street. Boston Police Commissioner William Gross, at the scene, told reporters that officers came across a group of men in their 20s Sunday afternoon, suspecting they had firearms. He says one officer was shot in the calf when he tried to follow the men into an apartment building. Gross says police then received reports that one suspect had barricaded himself in an apartment, requiring police to treat the situation as a potential hostage situation.

The injured officer was taken to Brigham and Women's Hospital, and his injury is said to be non-life threatening.

Those living in the neighborhood were shocked to see a scene like this. Resident Alaina Garry was on her way to her friend's house when she heard the commotion.

"Suddenly there was a swarm of cop cars and SWAT cars, and they told us that we couldn't come down this street and that there was a hostage situation," she said.

Mayor Marty Walsh issued a statement Sunday echoing Gross's concern with gun violence.

"Our police officers work hard every day to keep our residents safe, and this senseless violence will not be tolerated," the statement said.

The Associated Press contributed to this report.

Correction: An earlier version of this story incorrectly stated that three people were arrested. Three people were taken into custody, but only two were arrested.