That's exactly what happens when my daughter (same age) is constipated--the first time it happened I thought she had diarreah or something and was trying to hold it in! Eventually a big fairly solid poop came out (though not as hard as I expected), and the mystery was solved. Though her diet is high in fruits, veggies and whole grains, she still gets constipated occasionally. When it happens I restrict her snacks to prunes, dried apricots, fresh and dried berries, encourage her to drink lots of water, and limit juice and dairy products (apple juice is constipating, so don't give it to him--and prunes are 10X better than prune juice in relieving constipation). I also try to get her moving a lot, like swimming, bouncing, running, etc. Then whenever she strains to poop (and gets upset), I hold her hands, try to help her bend over a little, rub her back, and encourage her to relax and let it come out (I think she fights it because it hurts). Sometimes I let her have a little of my coffee in the morning too if she's constipated--not that coffee's great for little ones, but I reasoned a couple of sips might help more than hurt! Also, whenever the skidmarks show up, I coat her bottom with Aquaphor after every diaper change, because if I don't it gets raw and painful down there, too. Good luck!