is Leptospirosis (fecal contaminated water), and after that protozoa.

Assuming he didn't eat something dead while you weren't looking, he might have gotten a transient protozoa or some other bacterial infection from the water.

My older (2.3 yr old) female has a nasty habit of wallowing in a mud hole from a huge up rooted tree when it's hot - I call her my Wharthog puppy. Fortunately she has a cast iron stomach. What I'm thinking about doing the next time I take her and the other (who I sometimes refer to as the "muskrat") to the pond... is to get out the garden hose and wet her underneath and sides down with water. That might give her less temptation to get wet in the mud hole, since she'll already be wet. It might be worth a try for you too.

The black color of the diarrhea is due to blood being passed. If the stool goes firm, but the black color does not disappear, and especially if the dog becomes anorexic then get it to a Vet, and ask about the liver function. Chances are things will return to normal soon over the next couple of days.