I have had this happen while running before.

I stopped running, so the chase wasn't on. I turned and yelled "NO! BAD DOG" very loudly at the dog. Then I squirted water at it.

Once it backed away I started to walk off, while keeping an eye on it. I started running when it had left the area.