Sahih al-Bukhari, Book 23, Hadith 39 (Bukhari 1239)

Narrated Um 'Atiyya:

We were forbidden to accompany funeral processions but not strictly.