Maliks Muwatta Book 9, Hadith Number 20.

Section : Doing the Full Prayer when One Decides to Remain in a Place.

Yahya related to me from Malik from Ata al-Khurasani that he heard Said ibn al Musayyab say, “A traveller who has decided to remain somewhere for four nights does the prayer in full.”

Malik said, “That is what I prefer most out of what I have heard.”

Malik when asked about the prayer of a prisoner, said, “It is the same as the prayer of a person who remains in one place, except if he is travelling.”