Sahih al-Bukhari, Book 93, Hadith 37 (Bukhari 6904)

Narrated Abu Musa:

The Prophet (ﷺ) said, "Set free the captives and accept invitations."