Allah, glorious be His praise, said:
"Verily, those who swear allegiance to thee swear allegiance really to Allah; the hand of Allah is above their hands. So whoever breaks his oath, breaks it only to his own hurt, and to him who fulfills what he has pledged to Allah, He will grant a great reward."
And He said:
"Whoever obeys the Apostle has obeyed Allah."
So Allah instructed men that their homage to the Apostle is homage to Him, and their obedience to him is obedience to Him.
And He said:
"But no! by thy Lord, they will not become believers until they make thee judge in their disputes and do not afterwards find difficulty in Thy decisions, but surrender in full submission."
This verse, we have been told, was revealed in connection with a land dispute between Az-Zubayr and another man in which the Prophet gave a decision in favor of Az-Zubayr. This decision is a Sunnah laid down by the Apostle, not a command in the text of the Qur'an.
[Translator's Note: Yahya ibn Adam, in Kitab al-Kharaj, reports the case as follows, "One of the Helpers from among the Banu Umayya had a dispute with Az-Zubayr concerning a creek (sharj) in the harra, and the Prophet said, 'Irrigate, O Zubayr, and then leave the water alone.' The man of the Banu Umayya said, 'Justice, O Prophet, even though he is the son of your aunts!' And the face of the Prophet changed so that the man knew that what he had said had hurt the Prophet. Then the Prophet said, 'O Zubayr shut off the water till it reaches the height of two ankles' - or he said - 'until it reaches the fence - and then let the water flow.' It was revealed then, 'No, by thy Lord, they do not believe until they make thee judge in the tangles ... ' [Al-Qur'an 4:68]." Yahya ibn Adam, Kitab al-Kharaj, ed. A. M. Shakir (Cairo, 1347/1929), pp. 106-107; English translation by A. Ben Shemesh, entitled Taxation In Islam (Leiden, 1958), p. 74. See also Tabari, Tafsir, Vol. VIII, pp. 519-23]
The Qur'an indicates what I have just stated; for if this decision were a Qur'anic decision, it should have been prescribed in the text of the Book of Allah.
But if men fail to accept a decision based on a clear text of the Book of Allah, they undoubtedly cease to be believers, for they are rejecting a decision based on divine legislation. For Allah, Blessed and Most High, said:
"Do not put the Apostle's calling on you for aid on the same footing amongst you as your calling on each other. Allah knows those of you who slip away secretly, so let those who go against His command beware lest a trial befall them, or a painful punishment."
And He said:
"When they are called to Allah and to His Apostle that he may judge between them, lo, a party of them avert themselves. But if they are in the right, they will come to him in submission. Is there sickness in their hearts, or are they in doubt, or do they fear that Allah and His Apostle may act unjustly towards them. Nay, but they are the evildoers. All that the believers said when they were called to Allah and His Apostle that he might judge between them was: 'We hear and obey.' These are the ones who prosper. Whoever obeys Allah and His Apostle, and fears Allah and shows piety - these are the ones who attain felicity."
Through this communication, Allah instructed men that their recourse to the Apostle to judge among them is a recourse to Allah's judgment, for the Apostle is the judge among them, and when they accept his judgment they do so only because of an obligation imposed by Allah.
And He instructed them that the Prophet's judgment is His judgment, for his judgment is imposed by Him and by His established knowledge - rendering him a man of destiny and assisting him by preserving him from error and worldly success - and by testifying that He guides him and causes him to obey His order.
So Allah imposed the obligation upon His creatures to obey His Apostle, and He instructed them that obedience to him is obedience to Him. The sum-total of what He instructed them is the duty to obey Him and His Apostle, and that obedience to the Apostle is obedience to Him. He also instructed them that He imposed the duty on His Apostle to obey His order, glorious be His praise.
With thanks to Pewand Mohammed for correction of ayah reference