Among several causes of infertility, urogenital infections seem to be influencing factors. The effect of bacterial or viral sexually transmitted infections (STIs) on human fertility is not well understood. The aim of this study was to determine the frequency of STIs in cervical samples of infertile and fertile women and study the relationship between these agents and infertility. In this case-control study, cytobrush was used for collecting of cervical sample from each infertile and fertile woman (n=95) who attended Research and Clinical Centers for Infertility in Kerman, Iran. PCR and real-time PCR methods were used to detect the presence of bacterial (genital Ureaplasma species, genital Mycoplasma species, Chlamydia trachomatis (C. trachomatis), and Gardnerella vaginalis) and viral (herpes simplex virus, human papillomavirus (HPV), and Epstein-Barr virus) agents, respectively. Fisher's exact test and the logistic regression with the significance level of ≤5% were used for statistical analyses. In general, 78.94% and 14.73% of specimens were positive for one or more studied microorganisms, respectively. Among studied agents, only the infection with HPV was significantly different between infertile and fertile groups (p=0.005) which may enhance the likelihood of female infertility (OR=5.30, 95% CI:1.47-19.11, p< 0.05). After adjusting for age, irregular menstrual cycle, abnormal vaginal discharge, and ectopic pregnancy, the odds ratio of infertility in HPV-infected women increased (OR=7.02, 95% CI:1.52-32.3, p<0.05). Since HPV infection is asymptomatic, periodic screening of women in reproductive age especially infertile couples is recommended for early diagnosis and prevention of infection progression and cross contamination.