The gunman died after being confronted by officers, but the circumstances were unclear.