On the two-year anniversary of the death of Michael Jackson ... gunshots were fired just a few houses away from where fans were getting set to tour the home MJ lived in during his stint in Las Vegas -- and law enforcement sources tell us ... it was a dog that caught a bullet.
According to a witness on scene, the shots were fired approximately 3-4 houses away from the where the MJ tour was going down.
There were already cops in the area for a minor disturbance at the Jackson event (see photo above, taken before shots were fired) and we're told they rushed over to where the shots came from.
Law enforcement sources tell us ... an officer was attacked by a dog, and had to shoot it to get it to stop. No word yet on the condition of the dog.
UPDATE: We're told the dog -- a black pit bull around 40-50 pounds -- was NOT killed and was taken to a nearby vet.