I can refer you to this article about discharges, which states in part:
"Spotting Blood/Brown Discharge: This may occur when you are ovulating/mid-cycle. Sometimes early in pregnancy you may have spotting or a brownish discharge at the time your period would normally come. If you have spotting at the time of your normal period rather than your usual amount of flow, and you have had sex without using birth control, you should check a pregnancy test."
But since you are having pain and cramps you should be seen by a doctor who can conduct a pelvic exam. There is more information in that article but pain unlike that which you experience around your period is a signal to be seen by a doctor. It can also be other things, like fibroids or cysts, or something else.