A few components of this inquiry, despite being claimed and mentioned by the inquirer, seem to be unacceptable; they are noted below:
1. One must note that, supposing that the ahadith that rule a number of Sahaba as being kafir and munafeq, they don’t imply that they were idol worshipers or mushrik (polytheist).
2. The blessing of God and divine assistance cannot be measured through victory in battle and conquering of countries. Enabling one with power and authority, as well, cannot be a sign of his legitimacy, for most of the aggressors and tyrants around the world ruled great empires; if this authority was the sign of legitimacy, then, why didn’t the Prophet (sa) attain this position numerous years after him being chosen as prophet. Similarly, defeat for a kafir does not imply that he has not taken pleasure in the blessings of wealth and power in this world, in fact lots of kafirs possessed worldly blessings such as wealth and power, but what is certain is that these blessings will have no benefit for him in the hereafter.
3. Moreover, the vast majority of victories in the time of the caliphs were due to the experienced and clever strategies of Amir Al-Mu’mineen (as).
4. It is inevitable that in every government a few enemies emerge to create division by sparking tension and preparing the grounds for disorder and unrest in the government. Not every opposer was capable of not only staying silent and abstaining from complaint for the protection and the benefit of Islam and unity of the Islamic nation, but additionally assist and struggle for the progress of Islam and benefit of Muslims, like Imam Ali was (as).
5. The most important factor implemented during the reign of Imam Ali (as) was the exceptional manifestation of justice that has not been witnessed since. And this was all in addition to the spread of taqwa and confrontation with aggression, corruption and controversy.
A few components of this inquiry, despite being claimed and mentioned by the inquirer, seem to be unacceptable; they are as noted below:
1. Some ahadith from Sunni sources have ascribed apostasy to some of the Sahaba and the Shia do not interpret the term irtidad in these ahadith as kufr, nefaq, paganism and regression to the time of jahiliyyah. They also do not interpret the terms kufr and nifaq, in the context of those particular hadiths that ascribe kufr and nifaq to certain Sahaba (if we accept their authenticity), as shirk to God and idol worshipping. Our analysis is despite the fact that individuals of the Sahaba remained Muslim after the loss of the Prophet (sa) and abided by many of the legal rulings of Islam, they were not able to carry out their obedience towards the Prophet in the perfect manner, simply because of their roots that extended to the time of jahiliyyah which were never dried out and therefore fell into doubt and became divided over the prominent issue of wilayah. 
2. The blessing of God and divine assistance cannot be measured through victory in battle and conquering countries and the expansion of an empire. Enabling one with power and authority, as well, cannot be a sign of his legitimacy, for most of the aggressors and tyrants around the world ruled great empires; if this authority was the sign of legitimacy, then, why didn’t the Prophet (sa) attain this position until numerous years after his prophethood; does this convey that Allah did not assist his holiness or does it suggest that every event requires its own preliminary steps and that the grounds for each event must be prepared. However, the broad government of the Imam of haqq (truth), covering the world with haqq and propagating divine rulings, is an exceptional bestowment confined to Waliyullah (the apostle of Allah) or else a broad and pervasive government is simply the tradition of istidraaj (gradualism), in which God mentions in the ayahs: وَ الَّذینَ کَذَّبُوا بِآیاتِنا سَنَسْتَدْرِجُهُمْ مِنْ حَیْثُ لا یَعْلَمُونَ *وَ أُمْلىِ لَهُمْ إِنَّ کَیْدِى مَتِینٌ  ؛ فَذَرْنی وَ مَنْ یُکَذِّبُ بِهذَا الْحَدیثِ سَنَسْتَدْرِجُهُمْ مِنْ حَیْثُ لا یَعْلَمُونَ  ؛ وَ لا یَحْسَبَنَّ الَّذینَ کَفَرُوا أَنَّما نُمْلی لَهُمْ خَیْرٌ لِأَنْفُسِهِمْ إِنَّما نُمْلی لَهُمْ لِیَزْدادُوا إِثْماً وَ لَهُمْ عَذابٌ مُهینٌ  . Thus, every single one of these ayahs straight out denote that greatness and power don’t necessitate legitimacy, and that in reality, if power is combined with justice and the truth, it is a gift and blessing , and a threat and danger for those use it without the truth and justice. In other words we can deduce from the said ayahs that the bestowment of various and different ni’mahs (blessings) for unrighteous people is considered to be God’s tradition of istidraj instead of divine assistance and this is Allah’s deception  and under no circumstances divine assistance. Therefore, these things will basically be considered as divine assistance if the legitimacy of the caliphs is proven through different reasoning, but in the case of there being no acceptable reasoning for their legitimacy, their domination of others and conquering and power cannot be a reason for divine assistane.
3. Moreover, the vast majority of victories in the time of the caliphs were due to the experienced and clever strategies of Amir Al-Mu’mineen (as). For instance when Umar bin Khattab realized the Persian forces were preparing for a great attack, he came to the masjid and summoned the people and asked for their suggestions. Talhah said: You should attend the battle in order to give your soldiers confidence and enhance their battle. Uthman suggested: Go to the battlefield along with all the people of Syria, Yemen, Medina and Mecca so the Muslims would gain confidence and battle well. Uthman sat down but nobody stood up after him. Umar bin Khattab once again asked: Oh Muslims, suggestions. Imam Ali (as) then stated: It is not a clever tactic to send the Syrians to war because the Romans will attack their lands and kill their wives and children. Do not dispatch the people of Yemen for Ethiopia will attack and sabotage Yemen. If you deploy the people of Medina and Mecca the Arabs living on the outskirts will seek vengeance and sabotage these two cities. It is best for you not to leave either, but direct a letter to the people of Basrah to support the Muslims. Umar bin Khattab was pleased with this proposition and decided: This is the right opinion and we must act accordingly  .
Imam Ali’s (as) words also included that in the time of the Prophet (sa) we never fought reliant upon the amount and size of our forces but actually fought with dependence upon Allah, so don’t be afraid of the small quantity of the Muslim forces.
Not only did Imam Ali (as) protect the Muslims of Syria, Yemen, Mecca and Medina this way, he also saved the Persians from dying, because, if the Romans would have attacked they would’ve killed the wives and children of the Muslims. If the Ethiopians would have attacked they would have killed the families of the Yemenis and if the Arabs from the around Medina and Mecca would have tried to get revenge they would have assaulted whoever was left in these two cities. On the other hand, God knows what would have happened to the people of Iran if this massive force of troops would have attacked their land because in that period (the period of Yazdgerd the third, the last king of the Sasani Empire) the government of Iran was extremely weak and falling apart  and a small amount of Muslim forces were enough to defeat it, let alone ten times the forces based in the Persian territory.
Therefore Imam Ali (as) as an infallible, passionate and kind-hearted Imam for mankind (even non-Muslims and kafirs), made this war have the least danger and lowest number of casualties, and this happened.
His holiness sent his children to war under the command of the caliphates; for his holiness did not ask anything ever for himself and all he ever seeked was the benefit of Islam and since Umar and Abu Bakr were recognized as the elite figures of the Islamic society and that opposing their views in that crucial period where Islam was expanding and conquering countries and also had numerous enemies, especially that it would give the Persian and Roman empires evil thoughts of attacking the Islamic lands. It was with this impeccable insight that the imam wouldn’t allow the enemies of Islam to reach their goals. 
4. Historians report corruption under the broad reign of the caliphs that would have never occurred if Imam Ali (as) were to be the sole governor of the Islamic society. Now, we will mention an example of one of these deviations and leave the details for another time:
A. A class had developed in the Islamic society that endorsed Islam and was loyal to its principles, but only familiar with the outer layer of Islam instead of the core and true spirit; a group that would only emphasize and insist on the performance of prayer as opposed to wisdom and the purpose and objective of Islam.
B. Spreading division and prejudice and neglecting justice. For instance, in Iraq, non-Arabs were considered as second-class citizens and because of that the toughest and most difficult jobs, for instance, managing and supervising the bazaar or road management were allotted to them.
In the time of the second caliph, Iranians were not allowed in Medinah and this was apparently in order to not allow them to mingle and socialize with the Arabs and to seize the influence of the Iranians in infiltrating the capital of the Islamic world. When the caliph realized that the people were able to have foreign slaves, he did not agree with Arabs being slaves anymore.
Ibn Juraih writes: “…When the second caliph saw two individuals speaking Farsi, while performing his tawaf, he told them: Speak Arabic for whoever decides to learn and speak Farsi will lose his dignity. And according to the tradition that the second caliph established, Arabs could choose wives from foreign families but would never give their daughters to foreigners.
In line with this attitude, in the time of the Bani Umayyah children of foreign mothers were not qualified to become caliph. Hajjaj, the caliph of Iraq said: not a single foreigner should stand as the leader of congregational prayer. He would also force the Mawalis (non-Arab Muslims) to attend war or when they would attend war they were given less spoils of war than the Arabs. Even worse, no share of the Ata’ from Bayt al-Mal (treasury of the Islamic government) was given to the Mawalis.
And indeed this attitude distanced the Muslims from the true Islam and made them believe that Islam was only what they had experienced, saw and heard.
And this is why uprisings took place in conquered territories after invasions, compelling Imam Ali (as) to deploy an army to Qazvin and two other armies to Khorasan and seize cities like Neishabour for a second time.
The closing point is that in his short time of rule, Imam Ali’s (as) aim was to redress the deviations the Ummah of Muhammad (saw) was undergoing after the loss of the Prophet. Also, if it wasn’t for Imam Ali’s (as) advice who knows what would have befell Islam. 
5. There is no doubt that defeat of the munafeqeen and kuffar  is a divine tradition, but what is also a fact is that the lack of God’s assistance doesn’t imply that kuffar have not taken pleasure in the blessings of wealth and power in this world, in fact lots of kuffar possessed worldly blessings such as wealth and power  and what is certain is that these blessings will have no benefit for him in the hereafter  . And in the hereafter all of the divine promises on their behalf will be executed  and their defeat is because they don’t have any true benefits, for real benefits are in the hereafter and these actions in this world carry nothing with them but chastisement. Thus, in the Holy Quran chastisement has been explicitly mentioned and doesn’t suggest that the kuffar have not been granted with material blessings in this life; as a matter of fact, the exact opposite can be witnessed  and solely in a few instances has punishment shadowed over the kuffar in the past as a result of the prayer of prophets  but, even such a thing doesn’t apply to the ummah of our prophet (it will never happen that an all-encompassing punishment comes down on the entire Islamic nation) because by virtue of our holy prophet, such punishments will never take place.
6. It is inevitable that in every government a few oppositions emerge to create division by starting tension and controversy and preparing the grounds for disorder and unrest in the government. Not every opposer can be like Imam Ali (as) and stay silent and abstain from complaining so that Islam remains protected and united, and not only do that, but additionally, every now and then, take the hands of the rulers and advise or assist them. Most opposers usually tend to initiate disorder and unrest throughout the government in order to prove that the government is inadequate and incompetent or to completely eliminate it. Therefore, if we find that there was less disorder and chaos in the time of the three caliphs, it was simply because of the patience and decency of opposers like Ali ibn Abi Taleb (as) keeping silent, not just the competence of the government. On the contrary, when power was passed on to the opposers of the former government and Imam Ali (as) was appointed ruler and caliph and the Imam’s way of implementing justice gave an end to the illegitimate reception of goods and money by prominent figures of the previous government, his opposers were certainly not patient and embracing of hardships for the sake of the development and unity of the society and Islamic community. Thus, they put in all of their effort to bring down the government and replace the Imam with someone else. However, Imam Ali (as) wasn’t the type of person to give in to defeat, compromise and gain the people’s content with money so quickly, so he stood against and tried to annihilate them and this procedure escalated to the extent where he was martyred in the alter of prayer by the very initiators of tension and chaos . If he had compromised and surrendered even a little bit, neglected Islamic rulings, deviated from the path of legitimacy and rightfulness and collected bribes, a vast amount of these battles and disorders that took place in his period of reign wouldn’t have occurred. Therefore, we must note that not every model of peace and quiet is favorable and idealistic. Peace and tranquility must be achieved in the context of justice and religion. Obtaining such peace requires several battles and confrontations that Imam Ali (as) faced and overcame but was mercilessly martyred and as a result his mission was left unfinished.
7. Now regarding those who believe that the rule of an infallible lacks any good, we must say that these are those who desire welfare and comfort in a government at the expense of anything whatsoever. These people do not value the legitimacy of government which is solely a divine right and their understanding and knowledge of Allah is flimsy and implausible for they have focused their religious perspective on the appearance and have neglected the akhlaq (ethics) which has been emphasized and considered to be extremely important in the philosophy of Islam . From their perspective, if a government is established without divine validity, yet, basically manages to provide the grounds for a life with welfare and comfort it is therefore an efficient government while if a government is legitimately and divinely authorized and struggling and striving to its highest extent to implement concepts such as justice, taqwa, legitimacy of wealth and possessions in the society, this government is inefficient because it has not provided welfare. We must realize that this philosophy and reasoning is not in any way close to the authentic thinking of Islam because Islam has never overlooked the hereafter of mankind in favor of the dunya (this world) and in cases that the conjunction of these two together was not at some point possible, the Islamic doctrine has paid more attention to the hereafter by preferring it over this world. Although it is clear that practicing this doctrine has its own difficulties, if it prevails, it promises a peaceful world governed by justice and if or any reason does not succeed, it offers a pleasant eternity within the grace of Allah Almighty and nobody in their right mind should ever exchange eternity with temporary issues.
The most prominent and exceptional aspect of the government of Imam Ali (as) was the unique manifestation of justice that the world would never witness the likes of again, the spread of taqwa, confrontation of aggression, corruption and fitnah, etc. and if these cannot be acknowledged as blessings than what can be?; do you believe that the expansion of the Islamic government is a blessing? By which Islamic standard can the expansion of the Islamic boundaries be measured as a blessing when they are not ruled in justice? On this basis, we can conclude that according to the Islamic point of view and Islamic government, taqwa of Allah is of utmost importance, and every government must, firstly, have a ruler which is outstanding in terms of taqwa and wara’ and secondly, implement and put to practice the rulings of Islam in the society and nation, and who is more worthy and fit for this position than Imam Ali (as)?! The Nahj al-Balaghah is among us. If you take a slight glance and brief look through it you will realize the difficulties and predicaments the government of Imam Ali (as) had to struggle and deal with, but in the end was able to successfully solve.
 Adopted from Question 5965 (website: 6176). There are multiple questions on this regarding your inquiry that you can refer to.
 A’raaf:182 and 183.
 Aal Imran:178.
 As Imam Ali (as) says in the Nahjul-Balaghah: “یَا ابْنَ آدَمَ إِذَا رَأَیْتَ رَبَّکَ سُبْحَانَهُ یُتَابِعُ عَلَیْکَ نِعَمَهُ وَ أَنْتَ تَعْصِیهِ فَاحْذَرْهُ” Nahjul-Balaghah, pg. 472.
 See: Irshaad of Mufid, pg. 207, Arabic, printed by Aal al-Bayt Institute, 1413, Nahjul-Balaghah of Abduh, sermon 144; Taarikh Tabari, vol. 4, pp. 237-238; Taarikh Kaamil, vol. 3, pg. 3; Taarikh Ibn Kathir, vol. 7, pg. 107; Bihar al-Anwar, vol. 9, pg. 501.
 Taarikhe Iranian va Arabha dar Zamane Sasanian (The History of the Iranians and Arabs During the Time of the Sassanids) Farsi translation by Dr. Abbas Zaryaab and written by Theodore Nulid (pg. 418).
Dr. AbdulHussein Zarrinkub says in this regard: The fall of the Sassanid empire happened at the hands of the Arabs, but not out of the power of the Arabs, but because of the weakness and corruption that had overshadowed the Sassanid government. As a matter of fact, Iran had already fell when the Arabs attacked. The Sassanid empire then was like Prophet Suleyman (pbuh) who was leaning on his cane and the ants ate at the cane [till it broke] and the prophet fell to the ground. Weakness and corruption had crept into all pillars of the government and the Sassanid government was doomed to misery and abasement. Taarikhe Iran ba’d az Islam, second print, pg. 57.
The great thinker and philosopher, the Late Ayatullah Mutahhari, in his book of The Bilateral Services of Islam and Iran, embarks on a hair-splitting analysis of the defeat of the Iranians. He writes: “Despite the chaos and division it suffered from, Iran was militarily very strong. At that time, two superpowers had power, Iran and Rome. It has been estimated that the population of Iran then was around one hundred and forty million, a very high number of which were soldiers, while the number of Arabs when attacking Iran was around sixty thousand. If the Iranians had retreated, this number would have been lost in the Iranians number. Nevertheless, the Sassanid empire was annihilated for good by them.”
Ayatullah Mutahhari continues: “The truth of the matter is that the most important factor in the defeat of the Sassanids, was the masses’ dissatisfaction of the state of the government and the extremist rituals and traditions of that time. It is widely accepted by both eastern and western historians that the regime and social and religious circumstances of the time were so corrupt that almost all the people were upset of it. The Zoroastrian faith had become so corrupt in the hands of the Zoroastrian monks that the smart Iranian people couldn’t whole heartedly accept it, and even if Islam hadn’t found its way into Iran then, Christianity would have gradually taken it over and removed Zoroastrianism.” Therefore, the undesirable social and religious circumstances in Iran had brought about the peoples’ dissatisfaction and this was driving them towards a path that would lead to their eventual liberation. The Bilateral Services of Islam and Iran, Mutahhari, Morteza, eighth print, Bahman 59, pg. 77 and on.
 Adopted from Question 512 (website: 557).
 Aal Imran:141; Anfaal:18; Tawbah:2; Fatir:39.
 Ra’d:35; Furqan:26; Ahzaab:64; Zumar: 71.
 Taariq:17; Mu’minun:55.