Sahih al-Bukhari, Book 70, Hadith 1 (Bukhari 5159)

Narrated Abu Musa Al-Ash`ari:

The Prophet (ﷺ) said, "Give food to the hungry, pay a visit to the sick and release (set free) the one in captivity (by paying his ransom).