Mishkat al-Masabih 1342
‘Imran b. Husain said:
I went on an expedition with the Prophet, and I was present with him at the Conquest. He stayed eighteen days in Mecca and prayed only two rak'as [at each time of prayer]. He said, “You who live in the town must pray four; we are travellers.” 

Abu Dawud transmitted it.
وَعَنْ عِمْرَانَ بْنِ حُصَيْنٍ قَالَ: غَزَوْتُ مَعَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَشَهِدْتُ مَعَهُ الْفَتْحَ فَأَقَامَ بِمَكَّةَ ثَمَانِيَ عَشْرَةَ لَيْلَةً لَا يُصَلِّي إِلَّا رَكْعَتَيْنِ يَقُولُ: «يَا أَهْلَ الْبَلَدِ صَلُّوا أَرْبَعًا فَإِنَّا سَفْرٌ» . رَوَاهُ أَبُو دَاوُدَ