The Messenger of Allah ﷺ said, "It is not lawful for a Muslim to shun his brother for more than three nights, the two of them meeting and this one turning away and that one turning away. The better of the two is the one who initiates the greeting of peace."
أن رسول الله ﷺ قال: لا يحل لمسلم أن يهاجر أخاه فوق ثلاث ليال، يلتقيان فيعرض هذا، ويعرض هذا، وخيرهما الذي يبدأ بالسلام.
Malik narrated it in Husn al-Khuluq (13), from Ibn Shihab, from Ata bin Yazid Laythi, from Abu Ayub Ansari, who related it as mentioned.Bukhari narrated it in Adab (6077), and Muslim in Birr wa Silah (2560:25), both of them through the route of Malik with the same wording.His statement, "for more than three nights" the scholars said, this hadith establishes the prohibition of estrangement between Muslims for more than three nights, while permitting it during the first three nights by the explicit wording of the hadith. It was excused during those three days because a person is naturally prone to anger, bad temper, and similar things, so estrangement was excused for three days to allow that transient state to pass. This was noted by Nawawi in his commentary on Muslim.