As-Sajdah - 32:24

وَجَعَلْنَا مِنْهُمْ أَئِمَّةً يَهْدُونَ بِأَمْرِنَا لَمَّا صَبَرُوا وَكَانُوا بِآيَاتِنَا يُوقِنُونَ
[32:24]
And We made of them Imams to guide by Our command when they were patient, and they were certain of Our communications.
And We appointed, from among them, leaders, giving guidance under Our command, so long as they persevered with patience and continued to have faith in Our Signs.
And when they became steadfast and believed firmly in Our revelations, We appointed from among them leaders who guided by Our command.