Why Are Not Muslim Countries United?

Answered according to Maliki Fiqh by BinBayyah.net

These days the Muslim nation suffers from insecurity. We call upon disbelieving countries to solve our problems and lift injustice. If European countries have their own armies and nonetheless joined NATO, why do Muslim nations not establish one strong army to protect their peoples against any external aggression and at the same time to stop the dangers they face. Then there will be no need to invite America or any other power to help. Is this a good idea?

All praise is due to Allah. Peace and blessings be upon the Messenger of Allah. The issue you are talking about is vital. It seems that you have posed this question and presented these ideas because you believe in the importance of solidarity between the members of the Muslim nation. But we would like to say that solidarity between the members of the Muslim nation and between Muslim countries suffers from problems that are obvious to the naked eye. There are several reasons:
First, Muslims’ negligence of the teachings of their religion, particularly those related to the social system as prescribed by Islam. Almighty Allah said, “And do not quarrel [among yourselves], or else you will become fainthearted and your strength depart.” [8:46] In a prophetic hadith Muslims are described as being like “one building whose parts reinforce one another.” [Reported by al-Bukhary (481) and Muslim (2585)] This solidarity took the shape of having one ruler and one sovereignty for the Muslim nation, known as the caliphate.
This was the case before the ummah (Muslim nation) became divided on ethnical, racial and geographical grounds. Hence, the basic principle is that the ummah ought to be under one banner and one ruler. This is the basic principle prescribed by Islam. But the status quo shows that the ummah has been disunited for a long time, its enemies have grown significantly, and its magnificence has declined.
Second, recession in the field of industries and other aspects of material progress.

Third, the ceaseless, fierce campaign launched by the enemies of the ummah, especially western allies, under different pretexts – sometimes under the pretext of regaining Jerusalem from the Muslims through the crusade efforts, sometimes under the pretext of colonialism, and sometimes under the pretext of training the ummah and the enforcement of democracy. We should be aware of all of these.
Nevertheless, questioner, in a moment of conscience after the eruption of the fire in Al-Aqsa Mosque in 1969, the Organization of Islamic Conference was formed to represent a sort of the solidarity which you and we all call for; but the international powers have been watching and weakening its influence and vigor to form a strong united Muslim front. Thus, the organization has grown weak and regional interests have gained precedence. But this organization still gives a hope for the unity and the federation you called for. Your suggestion is reasonable. The ummah should have one army to protect it. It needs no foreign armies or interference in any form. But, unfortunately, I have to say that these days, this strong federation is far-fetched, considering the circumstances we live in. However, we ought not to despair of Allah’s mercy “For, most surely, none despairs of Allah’s mercy except the disbelieving people,” [12:87] Also He said: “And who desponds of the mercy of his Lord but those who are astray?” [15:56] We still have the hope that every person in the ummah will work and try to achieve this solidarity, even through a good word, a useful economic project, or an idea that can help the ummah to get rid of colonization. This is all I want to say.