**"And when Abraham was tested by his Lord with words"**
He tested him with commands and prohibitions. God’s testing of His servant is a metaphor for enabling him to choose between two things—what God wills and what the servant desires—as if He is examining what the servant will do, so that He may reward him accordingly.
Abu Hanifa (may God be pleased with him)—and it is also the reading of Ibn Abbas—read it as: “Ibrahima Rabbuhu” (Abraham [accusative] his Lord [nominative]). The meaning is that he called upon Him with words of supplication, testing whether He would answer him or not.
If you ask: "In the famous reading, the agent follows the verb in the underlying structure, so attaching the pronoun to it constitutes a pronoun reference before the antecedent," I say: A pronoun reference before the antecedent occurs if one says, "His Lord tested Abraham." But "Abraham tested his Lord" or "His Lord tested Abraham" is not a pronoun reference before the antecedent. In the first, the possessor of the pronoun is mentioned explicitly before the pronoun. In the second, "Abraham" is conceptually fronted. However, "His Lord tested Abraham" is not valid because the pronoun precedes the antecedent in both word and meaning.
"And he fulfilled them"
In one of the two readings, it refers to Abraham, meaning he performed them with the right of performance and fulfilled them in the best manner without negligence or slackness. Similar to this is: "And Abraham who fulfilled" (Q. 53:37).
In the other reading, it refers to God Almighty, meaning He gave him what he requested without diminishing anything. This is supported by what is narrated from Muqatil, who interpreted the "words" as what Abraham asked of his Lord in His sayings: "My Lord, make this a secure city" (Q. 2:126), "And make us Muslims [in submission] to You," "And raise among them a messenger from themselves," and "Our Lord, accept [this] from us."
If you ask: "What is the governing agent of 'idh' (when)?" I say: It is either implied, such as "Remember when He tested," or "When He tested him, such and such happened." Or it is linked to: "He said, 'Indeed, I will make you...'"
If you ask: "What is the position of 'He said'?" I say: According to the first view, it is an initiation, as if it were asked, "What did his Lord say to him when he fulfilled the words?" and the answer is, "He said, 'Indeed, I will make you an Imam for the people.'" According to the second, it is a sentence conjoined to what preceded it. It is also possible that it is an explanation and interpretation of "tested," meaning the "words" are what He mentioned regarding the Imamate, the purification of the House, the raising of its foundations, and the submission mentioned earlier in: "When his Lord said to him, 'Submit'" (Q. 2:131).
It is said the words are five regarding the head: parting the hair, trimming the mustache, using the siwak, rinsing the mouth, and sniffing water into the nose. And five regarding the body: circumcision, shaving the pubic hair, cleaning oneself after defecation, clipping the nails, and plucking the armpit hair.
Others say He tested him with thirty parts of the Sharia: ten in Surat al-Tawbah, ten in al-Ahzab, and ten in al-Mu'minun (up to the verse: "And those who are guardians of their prayers"). Others say they are the rites of Hajj, such as Tawaf, Sa'i, throwing the pebbles, Ihram, and standing at Arafat. Others say He tested him with the star, the moon, the sun, circumcision, the sacrifice of his son, the fire, and the migration.
"Imam" is a name for one who is followed, on the pattern of 'ilaf (like izar for that which is wrapped), meaning they follow you in their religion.
"And of my descendants"
This is conjoined to the kaf (in ja'iluka), as if He said, "And I will make some of my descendants [Imams]," just as one says, "I will honor you," and you reply, "And Zayd."
"My covenant does not include the wrongdoers"
Another reading is al-zalimun (nominative). It means: whoever is a wrongdoer among your descendants, My appointment and covenant of Imamate will not reach him; it only reaches those who are just and free from wrongdoing. They said this is evidence that a corrupt person (fasiq) is not fit for the Imamate. How can one be fit for it whose judgment and testimony are not valid, whose obedience is not obligatory, whose report is not accepted, and who cannot lead prayer?
Abu Hanifa (may God have mercy on him) used to issue secret rulings on the obligation to support Zayd ibn Ali (may God be pleased with them both), to send wealth to him, and to rise with him against the usurping thief who called himself Imam and Caliph, like al-Dawaniqi and his ilk. A woman once said to him, "You advised my son to rise with Ibrahim and Muhammad, the sons of Abdullah ibn al-Hasan, until he was killed." He replied, "I wish I were in your son's place." He used to say regarding al-Mansur and his associates, "If they wanted to build a mosque and asked me to count its bricks, I would not do it." Ibn 'Uyaynah said, "A wrongdoer can never be an Imam." How can the appointment of a wrongdoer to the Imamate be permissible when the Imam exists only to restrain the wrongdoers? If one who is a wrongdoer in himself is appointed, the common proverb applies: "He who makes the wolf a shepherd has done wrong."
"The House"
A name that predominates for the Kaaba, like "the Star" for the Pleiades.
"A place of return for the people"
A place of gathering and return for pilgrims and visitors; they disperse from it and then return to it.
"And a place of security"
A safe place, as in: "A secure sanctuary, while people are being snatched away from all around them" (Q. 29:67). Because the offender takes refuge in it and is not molested until he leaves.
"And take..."
Based on the intent of a command, meaning: "And We said, take from it a place of prayer where you pray." This is a matter of choice and recommendation, not obligation.
The Prophet (peace be upon him) took Umar by the hand and said, "This is the Station of Abraham." Umar said, "Shall we not take it as a place of prayer?"—meaning, shall we not designate it for its virtue by praying there, seeking blessing from the place where Abraham’s feet trod? He said, "I have not been commanded to do so." But the sun had not set before it was revealed.
"Our covenant"
We commanded them.
"That you purify My House"
Meaning: purify it from idols, impurities, the Tawaf of those in a state of major ritual impurity or menstruation, and all filth; or dedicate it exclusively to those who worship Him, so that no one else may defile it.
"And those who are devoted"
Those who reside near it, who have devoted themselves to it, meaning they stay and do not leave; or those in I'tikaf. It is also possible that by "devoted" he means those standing, i.e., those standing in prayer, as He said: "For those who perform Tawaf, and those who stand, and those who bow and prostrate" (Q. 22:26). The meaning is those who perform Tawaf and those who pray, because standing, bowing, and prostrating are the postures of the one praying.