When the Prophet came to know in the fourth attempt...
When the Prophet came to know in the fourth attempt, he asked Anas, “What caused you to do what you have done?” Anas said, “I was hoping it would be one of the Ansars instead.”[^4] Suffices this sahabi to hear the Prophet invoking his Lord to bring him the one whom He loves most, so Allah responds to his invocation when Ali (peace be upon him) comes to him. But the hatred borne by Anas towards him forces him to lie and to send Ali back claiming the Prophet had no need for him.
And he repeated his lie three consecutive times only because he did not accept Ali (peace be upon him) as the one whom Allah loves most next only to His Messenger. But Ali forced the door open the fourth time and entered, whereupon the Prophet asked him, “O Ali! What kept you away from us?” “I came to see you,” Ali answered, “but Anas sent me back thrice.” The Prophet asked Anas, “What made you do that, O Anas?” He said, “O Messenger of Allah!