Ibn Ishaq (may Allah have mercy on him) narrated: The Messenger of Allah (peace and blessings be upon him) stayed at Quba with Kulthum bin Hidm, a member of Banu Amr bin Awf, and it is also said that he (peace and blessings be upon him) stayed with Sayyiduna Sa'd bin Khaythamah (may Allah be pleased with him). He (peace and blessings be upon him) stayed among Banu Amr bin Awf on Monday, Tuesday, Wednesday and Thursday, and laid the foundation of their mosque. Then he left Banu Amr bin Awf, and the time of Friday reached him in the area of Banu Salim bin Awf, so he offered the Friday prayer in the mosque that is in the bed of the valley. Ibn Ishaq said: Then the Messenger of Allah (peace and blessings be upon him) stayed with Sayyiduna Abu Ayyub al-Ansari (may Allah be pleased with him), and the Messenger of Allah (peace and blessings be upon him) ordered the building of his mosque in that same year.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5395