Painful Sex

Had sex today it felt great in the beginning but had to stop him because I was in so much pain. Could I be pregnant? Or what caused this