Surah At-Tawbah, ayah 114

9:114

وَمَا كَانَ ٱسۡتِغۡفَارُ إِبۡرَٰهِيمَ لِأَبِيهِ إِلَّا عَن مَّوۡعِدَةٖ وَعَدَهَآ إِيَّاهُ فَلَمَّا تَبَيَّنَ لَهُۥٓ أَنَّهُۥ عَدُوّٞ لِّلَّهِ تَبَرَّأَ مِنۡهُۚ إِنَّ إِبۡرَٰهِيمَ لَأَوَّٰهٌ حَلِيمٞ ١١٤

Wamā kānastighfāru ibrāhīma li abīhi illā 'am maw'idatin wa'adahā iyyāhu falammā tabayyana lahū annahū 'aduwwu lillāhi tabarra'a minhu inna ibrāhīma la awwāhun halīm

And the request of forgiveness of Abraham for his father was only because of a promise he had made to him. But when it became apparent to him [i.e., Abraham] that he [i.e., the father] was an enemy to Allāh, he disassociated himself from him. Indeed was Abraham compassionate and patient.