Ibn ‘Abbas said, “God has prescribed the prayer by the tongue of your Prophet as four rak'as when resident, two when travelling, and one when danger is present.”
‘A’isha said that the prayer was prescribed as consisting of two rak'as, and after God's Messenger emigrated it was prescribed as four, but prayer while travelling was left according to the original prescription. Zuhri said he asked ‘Urwa why ‘A’isha said prayers in the complete form and he replied that she interpreted the matter herself as ‘Uthman did.
He and Ibn ‘Umar said that God’s Messenger established the practice of praying two rak'as when travelling, they constituting a complete observance and not an abbreviation; and the witr while travelling is a sunna.
Ibn ‘Umar said that God’s Messenger prayed two rak'as in Mina, as did Abu Bakr after his death, ‘Umar after Abu Bakr’s death, and ‘Uthman in the early part of his Caliphate, but afterwards ‘Uthman prayed four. When Ibn ‘Umar prayed with an imam he prayed four, but when he prayed alone he prayed two.