Sounds like my son stuck his hand through the fence to try and pet the dog and it bit him. Luckily his hand and fingers are intact, waiting on the x-ray to see if any bones are broken. Couple of pretty good lacerations as well.
We've taught the kids numerous times about dog safety, including not sticking your hands through any fences like this. Obviously hard to be upset at my kid though. Super frustrated at this stupid dog and the neighbors. It's like a 7 m/o lab mix that I'm fairly certain gets treated pretty poorly by the owners.
Bad deal all around.