Ibrahim bin Ja'far (may Allah have mercy on him) narrates from his father, from his grandmother Sayyidah Umm Nuwaylah bint Muslim (may Allah be pleased with her), who said: We prayed the Zuhr or Asr prayer in the mosque of Banu Harithah, facing towards Bayt al-Maqdis (Jerusalem). We prayed two units (rak'ahs), then a man came to us and told us that the Messenger of Allah (peace and blessings be upon him) had turned to face the Sacred House (the Ka'bah). So the men moved to the place of the women and the women moved to the place of the men, and we prayed the remaining two prostrations (units) facing the Sacred House. A man from Banu Harithah told me that the Messenger of Allah (peace and blessings be upon him) said: "Those are men who believed in the unseen."
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 21545