ANSWER:

If it was just a thought that crossed the mind, this is not kufr. One must fight it and ignore it.

If kufr happens during obligatory prayer and one repents after a few second does he have to repeat the prayer? And if a muslim repents from kufr does he have repeat shahadah

Apostasy |