Ovaries hurt

They only hurt after I have sex. It was usually only in the morning when my SO and I had sex before I peed but today it was in the middle of the day after we had sex and they were so painful. It went away after a little while (which felt like a long time) 
I heard this could be a pregnancy sign or something?? What could it be?