Uthman bin Abdullah, the grandson of Sayyiduna al-Arqam (may Allah be pleased with him), narrated that Sayyiduna al-Arqam (may Allah be pleased with him) was a Companion who fought at Badr, and that the Messenger of Allah (peace and blessings be upon him) took refuge in his house near al-Safa until the Muslim men were a full forty, and the last of them to accept Islam was Sayyiduna Umar bin al-Khattab (may Allah be pleased with him). When they had become forty, they came out before the polytheists. Sayyiduna al-Arqam (may Allah be pleased with him) said: I came to the Messenger of Allah (peace and blessings be upon him) to take leave of him, as I intended to go to Bayt al-Maqdis. The Messenger of Allah (peace and blessings be upon him) said to me: "Where do you intend to go?" I said: To Bayt al-Maqdis. He (peace and blessings be upon him) asked: "What is taking you there? Is it for trade?" I said: No, rather I want to pray there. The Messenger of Allah (peace and blessings be upon him) said: "One prayer here is better than a thousand prayers there."
Hadith Referenceالمعجم الكبير للطبراني / باب الألف / 903