I was training my 4 year old dog today, trying to teach him a new trick, to jump up. He was enjoying it and was excited and I was giving him praise (petting him and making a fuss) when he did it, and gave him a biscuit occasionaly. Then randomly he decided to bite me. He was in a good mood and excited and suddenly, in a split second he changed, growled and bit me. He then walked away, and went and sat in another room. This is the exact order I did things. I showed him the biscuit and he ran to me. I said sit. He sat. I praised him: "goood boyy, you can sit! etc" petting him at the same time. I said down. He went down and I praised him the same way. I said jump. He jumped and I praised him and gave him the biscuit. I then did it again, but in a different order: jump to sit to down. When I went to pet him for sitting he suddenly and quite randomly jumped at me growling and bit me. He then growled showing his teeth, then walked out of the room and went to sit quietly in another room. Why did he do this? Maybe his instinct because there was food around (my biscuit I was going to give him)? But it makes no sense. He was so happy, wagging his tail and enjoying it, and then (literally) out of nowhere he changed, showed his teeth and bit me within a split second. He has never acted like this before apart from when he was a puppy or when he's been eating and someone has tried to take his food away (or when hes been ill). Maybe he might be ill?