Authorities say a man who was helping a gunshot victim exchanged gunfire with Boston police, who shot him dead.

Police Commissioner William Evans says officers responding to a report of gunshots fired spotted two men leaving the area in the city's Dorchester neighborhood Friday morning. He says one of the men was armed.

Evans says the officers ordered him three times to drop his gun before gunfire was exchanged and he was killed.

Evans says it's not clear whether the gunshot victim was also struck by police gunfire.

A third victim with a gunshot wound was found in a nearby residence. Police believe the two men had been there before the shootout with police.

The Suffolk County district attorney's office says it's conducting an independent investigation.