My period had ended completely and I did ghusl at night, and intended to fast from the night before, but when I got up to pray Fajr and I was completely pure, suddenly I discharged a white thread and some light brown discharge that could hardly be noticed except from close up, but this did not come whilst I was doing ghusl. 

Is this prayer valid or do I have to repeat it? Is my fast of that day valid? Please note that I did not do ghusl after this discharge.


Praise be to Allaah.
 

This brownish discharge that came after doing ghusl does not
matter and is not regarded as menstruation, so your fast is still valid and
you do not have to do ghusl after it came out, because Umm ‘Atiyyah said:
“We did not regard brownish or yellowish discharge after the period ended as
being anything that mattered.” Narrated by Abu Dawood, 307; classed as
saheeh by al-Albaani in Saheeh Abi Dawood. Also narrated by
al-Bukhaari with the words: “We did not regard brownish and yellowish
discharge as anything that mattered.” 

But this brownish discharge does invalidate wudoo’, so if you
did wudoo’ for Fajr prayer after this came out, then your prayer is valid
and you do not have to do anything. If it came out after you did wudoo’ and
you did not repeat wudoo’, then you have to repeat that prayer because you
prayed without wudoo’. 

Shaykh Ibn Baaz was asked in Majmoo’ al-Fataawa
(10/214): 

I noticed that when
doing ghusl following my monthly period, which usually lasts for five days,
sometimes a very small amount comes out of me, immediately after doing
ghusl, then after that nothing comes out. I do not know whether I should
assume that my regular period is five days and whatever comes after that
does not count, and I should fast and pray and I don’t have to do anything
else because of that, or I should regard that day as part of my period and
not pray and fast then? Please note that this does not always happen, rather
it is approximately every two or three cycles. 

He replied: 

If what comes out of you after you have purified yourself is
yellowish or brownish, then it should not be regarded as anything that
matters, rather it comes under the same ruling as urine. But if it is
obviously blood, then it should be regarded as part of the period, so you
have to repeat your ghusl, because of the report from Umm ‘Atiyyah (may
Allaah be pleased with her), who was one of the companions of the Prophet
(peace and blessings of Allaah be upon him). She said: “We used not to
regard yellowish or brownish discharge after purification as being anything
that mattered.” 

Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was
asked in Fataawa al-Siyaam (p. 105): A woman says that her period
came, then the bleeding stopped on the sixth day from Maghrib until twelve
midnight, so she did ghusl on that day and fasted the following day. Then
some brownish discharge came but she fasted that day. Is that to be regarded
as part of her period even though her usual period is seven days? 

He replied: 

This brownish discharge is not part of the period. The
brownish discharge that women get after the end of the period is not
anything that matters. Umm ‘Atiyaah (may Allaah be pleased with her) said:
“We used not to regard yellowish or brownish discharge after purification as
being anything that mattered.” According to another report: “We used not to
regard it as anything that mattered” – and she did not say after
purification. Menstruation is blood, not brownish or yellowish discharge.
Based on this, then this woman’s fast was valid, whether that was on the day
when she did not see any brownish discharge or on the day when she did see
some brownish discharge, because this brownish discharge is not
menstruation. 

The Standing Committee (10/158) was asked about a woman who
became pure (i.e., he period ended) in Ramadaan before dawn came, so she
fasted that day, then she went to pray at Zuhr and saw some yellowish
discharge. Is her fast valid? 

They replied: 

If she had become pure before dawn then fasted, her fast is
valid and the yellowish discharge she noticed after becoming pure does not
affect it, because Umm ‘Atiyyah said: “We used not to regard yellowish or
brownish discharge after purification as being anything that mattered.”.