Burning sensation when boyfriend fingered me

Tonight when things were getting intimate between us, my boyfriend started to finger me. It was fine at first but then I started to get a burning sensation. It got to the point where it was so painful/uncomfortable that I made him stop. We then had sex a few minutes later and I didn't have any discomfort. I've never had this kind of sensation before. Any ideas on what it could have been? Could he have hit something with his finger or scratched me?