Pain while having sex

My SO and I were having sex and it just hurt so badly we had to stop (it was such a mood killer-_-) anyway I'm worried as to what this could be? I'm ovulating so could that have something to do with it?