Who did Ali fight against before this battle?