One man shot another in Southwest Baltimore on Wednesday morning, and then a school police officer and the shooter exchanged gunfire, authorities said. Neither the officer nor the suspect was injured, police spokesman Lt. Jarron Jackson said. The suspect was taken into custody.

The victim, a 34-year-old man, was taken to an area hospital with gunshot wounds to the leg, Jackson said. His injuries did not appear to be life-threatening.

Citywide shooting detectives are investigating the initial shooting, Jackson said. Police did not release the identity of the suspect. Police do not release the identities of nonfatal shooting victims.

Homicide detectives are investigating the actions of the school police officer. Homicide detectives typically handle investigations into the use of force by officers from other agencies. Police do not believe the officer’s shots hit anyone.

Jackson said the school police officer witnessed the shooting near Frederick and South Augusta avenues in Irvington at about 9:25 a.m.

The officer, who was on patrol, got out of his car to chase the suspect, a schools spokeswoman said. The suspect and the officer exchanged fire, spokeswoman Karen Parks said.

Tony Benson, 53, said he was working at an outreach center at the intersection when he heard the gunfire.

“Couldn’t help but hear it; it was so many shots,” he said. “It was a shootout.”

Benson said he ran to the window and saw a police officer chasing a man who had a towel wrapped around his head.

The man got into an Audi sedan, Benson said. Another man was behind the wheel. Benson said the man drove directly at the officer.

The officer opened fire, Benson said, and the car then crashed into two cars parked on the street.

Benson said the suspect then got out of the car and ran west down Frederick Avenue.

Jackson said he could not confirm Benson’s account. He did say a handgun was recovered in the Audi. The car remained at the scene with its rear windshield missing and hazard lights blinking.

Jackson said police did not know the motive for the shooting.

Bernell James, 51, said he was walking down Frederick Avenue when he heard the gunshots.

“It was like at least eight or nine,” James said.

James, whose mother lives in the area, said he was not surprised by the shooting.

“There’s no law around here,” he said. “It’s like the OK Corral.”

There had been four shootings in Irvington through May 28 of this year, according to police data.

“It’s a shame, but it’s not surprising,” Benson said. “It’s happening all over the city.”