How pregnant are you? Is there any bleeding? What type of pain is it?
These are all questions your doctor will ask and the only person who can give you proper advice here is your doctor. Phone your surgery and ask for an emergency appointment. Good luck.
i had the same, mine turned out to ba a water infection, but i was tested for other things to like gall stones, kidney infection.
it may also be that the baby is lying on a nerve