Possible contractions after sex

So. Earlier today I had sex, and after I was sitting down and all of the sudden I randomly felt like my stomach was tightening in random spots and it'd feel hard in that same spot. It happened like 4 times and then went away, were these contractions.? Should I stop having sex.?