The Holy Quran Surah Nisa verse 59 says...
The arrangement of the words shows that the obedience of Ulil-Amr is as much obligatory as is the obedience of the Messenger because Quran uses just one verb for both of them without repeating the verb again. Naturally, it means that Ulil-Amr should be of the same importance as the Messenger in terms of obedience to them; otherwise, Allah would not have joined them together in this verse under one verb.
It is interesting to note that Allah (swt) uses a separate verb for Himself before mentioning the Messenger and Ulil-Amr, which shows that Allah has higher authority than that of the Messenger and Ulil-Amr. It is also clear from the above verse that Ulil-Amr does not mean messengers, Ulil-Amr and the Messengers are not the same. Otherwise, Allah would only have said: “Obey Allah, and Obey Messenger only.” But He added Ulil-Amr (those who are given authority by Allah).
This is one of the places where the concept of Imamate and the necessity of obedience to them come from.[^5] The brothers of Ahle Sunna (the Sunnis) translate this word Ulil-Amr as rulers because the rulers have authority over their subjects. But this translation makes the ruler come and stand on the same platform as of the Holy Prophet (sawa), because as per Arabic grammar, the ayah uses one verb for the Prophet and Ulil-Amr. This cannot be possible because the rulers tend to sin and oppress.
The Holy Prophet (sawa) never sinned, and the Ulil-Amr (the ones vested with authority) also cannot sin. Why? Simply because if Allah wants us to follow and obey someone, then He cannot obviously order us to obey sinners. So, as per the Shia belief, the word Ulil-Amr in this ayah is referring to the infallible/sinless Imams. As per the ayah Surah Nisa ayah 59, it is the command of Allah (swt) to obey Him and obey the Holy Prophet (sawa) and the Ulil-Amr (those vested with authority).
Shias say that the Ulil-Amr are the infallible Imams.