And how should they have attempted to “detain” him?
How do you detain anyone? First, request that he stay until the police arrive. If he declines to do so, physically restrain him until police arrive. Failing that, follow him while in contact with the police, so they can find you and pick him up.
Shooting him was a stupid act; now even if his motives were criminal he's become a martyr.