can chlamydia cause ectopic pregnancy

So I just found out I'm pregnant in the doctors right now and I was bleeding from the 11 till 18 it stopped and then came again they did a pelvic exam and my cervix was closed which was good but they wanted to refer me to emergency so I'm still waiting. I'm worried cause I had chlamydia before twice not sure how long but it was treated I'm hoping this isn't ectopic I have no pain or anything