Real contractions or baxton hicks

Hannaha

Im 31 weeks....Earlier today my husband and I had sex and i started to cramp really bad after..kinda felt like poop pains so i went to set on the toilet. I have cramped before after sex but not like this. They started getting really really bad. I started counting how long they lasted and how far apart they were but they came so quickly it was hard to keep count. They were almost constant but would stop then come back sometimes. This went on for 2 hours. Eventually they eased and i went to sleep. After i woke up i was fine and still am. (I did orgasm twice and he came in me)..ive read that can start contractions.

...were these real? And if they were could they have stopped and me be fine now?