Deadly encounter between gunman and officers