The Prophets - 21:51 We had bestowed on Abraham the gift of understanding and comprehension before, and We knew him well.
Related:
The Arabic Letter Sad/38:45 Remember our servants Abraham, Isaac and Jacob. They were resourceful, far-sighted.
The Arabic Letter Sad/38:46 We made them pure because they thought only of the Hereafter.
The Arabic Letter Sad/38:47 They were chosen of the good ones with Us.