Sahih Bukhari 4331
This is in the light of the instruction of Reconciliation of Hearts (مؤلفۃ القلوب) See 9: 60. There had been enmity between them and the Muslims, in this way the prophet welcomed them by giving that good gesture.