Hello,
This sharp pain close to periods can be due to pelvic inflammatory disease, fibroids, endometriosis (abnormality of lining of uterus), pelvic tumors, and intra uterine device (like copper-T but less likely in your case. You should consult gynecologist for internal examination and other test needed to detect it's cause if the repeat happens.
I hope it helps. Take care and regards.
you could have a contracting uterus you should see a gyenacologist.... sorry i know thats not spelt correctly. dark brown blood is just old blood coming away from the womb. the pill can lessen or increase bleeding.