"I heard a man praying for forgiveness for his parents who were idolaters, and I said: 'Are you praying for forgiveness for them even though they are idolators?" He said: 'Didn't Ibrahim pray for forgiveness for his father?' I went to the Prophet and told him about that, then the following revealed: And Ibrahim's (Abraham) invoking (of Allah) for his father's forgiveness was only because of a promise he (Ibrahim) had made to him (his father)."
Reference: Sunan an-Nasa'i 2036 In-book : Book 21, Hadith 220 English translation : Vol. 3, Book 21, Hadith 2038
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.