"I heard Najiyah bin Ka'b narrating from 'Ali that he came to the Prophet (ﷺ) and said: 'Abu Talib has died.' He said: 'Go and bury him.' He said: 'He died as an idolator.' He said: 'Go and bury him.' ('Ali said:) 'When I had buried him I went back to him and he said to me: 'Perform Ghusl.'"
Sunan an-Nasa'i Book 1, Hadith 191