Praise be to Allah.
It seems – and Allaah knows best – that as long as this spotting came at the usual time of the period and was connected to the bleeding that came afterwards, then it is part of the menses, so you should stop praying and fasting at that time.
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked: Before my monthly period, I get a brownish discharge that lasts for five days, and after that I get the normal bleeding, and the bleeding lasts for eight days after the first five days. I pray during the five days, but I am wondering whether I should fast and pray during those days or not.
He replied: If the five days when you have the brownish discharge are separate from the days when you bleed, then it is not part of your period, and you have to pray and fast during those days, and you should do wudoo’ for each prayer because it comes under the same ruling as urinary incontinence, not menses, so it does not mean that you cannot pray and fast. But you have to do wudoo’ each time until it ends, like the bleeding of istihaadah.
But if these five days are connected to the menses then they are part of the menses and should be regarded as part of your period, so you should not pray or fast.
End quote from Majmoo’ Fataawa al-Shaykh Ibn Baaz (10/207).
And Allaah knows best.