Was this a contraction?

Just woke up at 2am to the most unbearable stomach pain while I was rolling over! It felt like someone was trying to rip my stomach off and lasted about a minute maybe I couldn't even move. I'm 37 weeks is this a contraction or should I be concerned? It's been almost a half an hour since it happened and it hasn't happened since.