Welcome to Healthcaremagic.
I would consider you a male and proceed with my opinion as it is no where mentioned.
The pain you describe is typically seen in conditions affecting the testis .Most common amongst are testicular inflammation
and torsion of testis.
To rule out both you may have to be examined by a surgeon.They are usually a recurrent problem, do get examined yourself before you get hit by another episode.
Wish you good health.