Hadith 503470
Chapter 9: Shortening the Prayer - كتاب قصر الصلاة فى السفر
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، أَنَّ ابْنَ عُمَرَ، أَقَامَ بِمَكَّةَ عَشْرَ لَيَالٍ يَقْصُرُ الصَّلاَةَ إِلاَّ أَنْ يُصَلِّيَهَا مَعَ الإِمَامِ فَيُصَلِّيهَا بِصَلاَتِهِ .
Yahya related to me from Malik from Nafi that Ibn Umar stayed in Makka for ten nights, shortening the prayer, except when he prayed it behind an imam, in which case he followed the imam's prayer.
Reference Muwatta Malik 503470
USC-MSA web (English) reference : Book 9, Hadith 19