After you separate your dog from the attacking dog, the first thing to do is get the names and contact information of the other people who were involved (dog owner, dog walker, rescuers if any) as well as the witnesses (those who saw what happened, those who heard statements made by people at the scene). Check yourself thoroughly for bites, torn clothing and other damages, and show the same to the witnesses and other people involved.
If you are in a city where there are leash laws and other laws pertaining to the confinement or control of dogs, and you feel that the other party broke one of those laws, call the police and animal control departments while still at the scene.
If the attacking dog has done this before, and the dog was at large (unrestrained) when the fight with your dog happened, call the authorities because it is an offense to permit a dog to go at large if the dog is known to “run, worry, or kill livestock, domestic animals, or fowls” (Health and Safety Code section 822.012).
In an extreme case, you can kill the attacking dog after the pets are separated. Health and Safety Code section 822.013 provides:
“A dog or coyote that is attacking, is about to attack, or has recently attacked livestock, domestic animals, or fowls may be killed by:
(1) any person witnessing the attack; or
(2) the attacked animal's owner or a person acting on behalf of the owner if the owner or person has knowledge of the attack.”
When it comes to killing an attacking dog, the catch-22 has to do with the manner in which one carries out the killing. In one case, Attorney Kenneth M. Phillips, the author of this site, was consulted by a Purple Heart recipient who, while confined to his wheelchair, shot an attacking pit bull and thereafter was criminally prosecuted for animal cruelty and discharging a firearm within city limits. If you have to legally kill a dog, do it in a way that won’t provoke the filing of criminal charges.
You also need to get reimbursed for the veterinary medicine costs that stem from the attack on your dog. The easiest way to make a successful reimbursement claim is to follow the steps given in Attorney Phillips' book, When a Dog Is Injured Or Killed.