Gas or???

Ok so this morning when I woke up I had the worst cramp ever in my life. It was like a shooting pain and I was screaming because it hurt so bad. Then I farted really loud and the terrible pain went away. My stomach still hurt all day though and (tmi) I had mushy poop all day. It's not period week so it's not that. Actually it's ovulation week. Am I just over thinking this and it's just gas? But if it was gas then why did it hurt so bad and why did I then feel terrible all day?