Is OTHER wrong in the post ? POST : Some background. I'm 14 years old, and have had my dog since it was 3 months old.  We go on the same walking path ever since I got him, and nothing like this ever happened to us. 

This happened a few days ago. I went out for a walk with my 2 friends and my dog (which is a 1.5 year old German shepherd), like we usually do, but this time, as we were about 5 minutes into our walk, (keep in mind we're walking on somewhat of a narrow sidewalk, so we have to basically single file line our way through until we get to the wider road.) There was a stray and very aggressive dog wandering around. We were very worried as to being attacked by the dog,which could have been rabid, and my German shepherd potentially being injured or infected.

 The dog, which we will call AD, (aggressive dog) comes charging at us, obviously going for my dog which we will call MD (my dog) and tries to go for his face. He gets my dog in the back (no idea how). AD is a medium size, probably mix breed, slightly smaller than MD, but very feisty dog. As AD has a very strong jaw grip on MD's back fur, fight or flight kicks in and I...kick AD in the face. It whimpers, lets go of MD, and then runs away.

 I love MD to death, I would do anything for my best bud, so I couldn't let him get injured. On the other hand, I also felt really bad for AD moments after, seeing AD whimper and run away, as I'm a very lighthearted person. The friends I was with, all retreated a couple metres away. And they saw everything, which was an event of about 15 seconds, and said that I shouldn't have kicked AD, and that MD was obviously bigger and capable of defending himself. I also told my parents when I got home and they said that maybe I shouldn't have kicked AD but somehow pulled AD away from MD? 

Afterwards I went home, got my dog some water, and immediately went to the vet with my parents and told the vet everything that had happened, got MD checked, (fortunately no wounds or blood, didn't even break skin.) The vet brought the same argument to the table as my parents. I'm really lost here, and don't know what was the right thing I should have done? Please no rude comments. I'm sure someone agrees with me? 