Officers 'ran toward gunfire,' prosecutor says