as though he were aboard a ship on a river that runs through the town. While the ship is moored, he pronounces the opening takbīr for the prayer; then the ship begins to move and leaves the town while he is still praying. He must then complete the prayer, because he began it in a state in which completing it was obligatory; therefore, he must complete it.
“Or while travelling, then he becomes resident, …”
His statement, “Or while travelling, then he becomes resident,” refers to the second case: that is, he begins the prayer while travelling and then becomes resident—the reverse of the first case. For example, if a ship is approaching the town and the river runs through it, and he pronounces the opening takbīr while aboard the ship before entering the town, then the ship enters the town, he must complete the prayer. This is the position of the school, because two factors have come together in this act of worship: one permits shortening the prayer, while the other prevents it. Thus, the factor that prevents shortening takes precedence. The factor permitting shortening is travel, which was his state when he began the prayer; and the factor preventing it is residence, which was his state when he completed it. Therefore, this latter factor takes precedence, because the jurists have a principle: when a permissive factor and a prohibiting factor coincide, the ruling is determined by the prohibiting factor; or, when a permissive factor and a prohibiting factor coincide, the side of prohibition takes precedence.
The evidence for this principle is the saying of the Prophet, may Allah’s peace and blessings be upon him: “Leave what makes you doubtful for what does not make you doubtful.” (1)
And his saying, may Allah’s peace and blessings be upon him: “Whoever avoids doubtful matters has safeguarded his religion and his honor.” (2)