Pain in....

While having sex with my SO It felt like he was hitting something. Then I got these sharp pains. It got so bad we had to stop and we couldn't go on and I couldn't move for some time. Any one know what this might be? Or had anything like it? Cramps x10 or spasms...something