You did the right thing. Most of the other options may have ended in jail time.

Walk away from trouble. If it chases after you then defend yourself. A black kid back in my home town shot a white kid back in the 60's. Everyone was upset and ready for a stiff sentence, but the witnesses all said the black kid ran from these white punks for several blocks before he finally was cornered. Only then did he pull out a pistol and shoot. He didn't go to jail.