What is the ruling on performing prayer while uncertain of the time without any basis for deduction?

Chapter on Prayer Times

Al-Mughni

Book of Prayer

Book 3 · Issue 4 · Bab 2

Open in Qurani

Primary text

If prayer is performed while doubting the entry of the time without any guiding evidence or deduction, the prayer is invalid, regardless of whether the timing ultimately turned out to be correct or incorrect. This is because the prayer was performed while a necessary condition for its validity—the certainty or presumed certainty of the time—was lacking and unsupported by any basis for judgment, similar to when one prays without reasoning when the Qibla is ambiguous.