Local laws may vary but defense of others is typically seen as valid too. Imminent threat of nighttime home invasion is probably in a textbook as the obvious example of when a reasonable and capable person may intervene.
Masked armed thugs stacking up on your neighbor's door? Tally ho, motherfucker.