A suspect in a motor vehicle stop opened fire on police on Friday evening and seriously wounded an officer before being killed by other officers at the scene, authorities said. An apparent bystander also was shot.

The wounded officer was shot just below his right eye and was in critical condition in an induced coma fighting for his life at a hospital, police Commissioner William Evans said.

Other officers returned fire and killed the suspect at the scene, Evans said. A woman at the scene suffered a flesh wound to her right arm and was in good spirits, and three other officers were taken to a hospital with stress-related problems, he said.

The names of the officers, the suspect and the wounded woman weren't immediately released.

The officer who was shot is on the police Youth Violence Task Force and is a highly decorated military veteran, Evans said.

"The officer here is in tough shape, but we're all pulling for him, and hopefully he'll pull through," Evans said. "His family's with him, the clergy has been here and ... let's pray for him."

Evans said the police officers were watching the vehicle before pulling it over. He did not say why the officers stopped the vehicle. One of three people in the car got out, opened fire on the officers and was killed, he said.

Police were interviewing the other two people in the car, and it was too early to say whether criminal charges would be filed against them, he said.

Such shootings are rare in Boston, but firearms are a major concern in the city, the commissioner said.

"We've got way too many guns out there, way too many young kids running around with the guns," he said, "and unfortunately this is what happens."

Mayor Marty Walsh said his thoughts and prayers were with the injured officer, his family and the police department.

"These acts of violence have no place in our neighborhoods," Walsh said. "Our community is stronger than ever, and tonight we are thankful for all of those who put their lives on the on the line every day to protect our city."