What alternative ways could those protestors/strugglers have pursued to keep themselves from the invading powers branding them as "Terrorists" while continuing their struggle against them?
Those who are in power, write the history. If you fight your government and win, the history that you write will call you a "freedom fighter". If you lose, your government's history will call you a "terrorist" or ignore you and your struggle completely. Even if the protest is for a legitimate reason and done peacefully, those in power will always try to demonise those who protest against it.
So any political struggle, as you rightly recognized, has to prevent this kind of demonisation or to reduce its impact on those who support it.
What is the way of protesting/struggling for a comparative weaker resistance force without being branded as "Terrorists" when an external power invades a country?
When you use non-violent means of political actions, it is harder to criticise and demonise such politics. Thus, the safest way to do politics, when oppressed by a superior force, is the Gandhian political philosophy of non-violent resistance or civil resistance.
It is important to understand that Gandhi's ingenuity was combining politics with spiritual elements. Due to this, the political opposition he created was high in morality and thus easy for everyone to respect and relate to (even against whom it was directed), and hard for anyone to criticise or demonise because our moral values spring from spirituality which is a dominant aspect of human society everywhere (since we discovered religion).
For Gandhi, the root of non-violent resistance or civil resistance stems from the spiritual idea of Ahimsa. Though the word Ahimsa is indian in origin, and from indian religious texts, it is a spiritual idea that all the major religion also advocate. It prescribes prioritising compassion (for self and others) and self-control in everything we do and to find a peaceful resolution to conflicts through non-violence (by not hurting anyone through thoughts, words or deeds and recognising that we are all one with humanity).
While Martin Luther King and Nelson Mandela adopted Gandhi's political philosophy, they imbibed it more with Christian and African spiritual values respectively, drawing upon the life and teachings of Jesus Christ and African Ubuntu culture to incorporate the Ahimsa elements that Gandhi suggested. The muslims of middle-east can also do something similar as they too already have a great historic example of this political philosophy in the life and teachings of Prophet Muhammad (PBUH). Prophet Muhammad described the idea of Ahimsa as the "greater Jihad" through the virtue of hilm to fight jahiliyyah:
His life was a jihad: as we shall see, this word does not mean “holy war,” it means “struggle.” Muhammad literally sweated with the effort to bring peace to war-torn Arabia ... His life was a tireless campaign against greed, injustice, and arrogance. He realized that Arabia was at a turning point and that the old way of thinking would no longer suffice, so he wore himself out in the creative effort to evolve an entirely new solution. ...
Muhammad was not trying to impose religious orthodoxy - he was not much interested in metaphysics — but to change people's hearts and minds ... This was a frightening period. The incessant wars between Persia and Byzantium seemed to herald the end of the old world order, and even within Arabia, tribal warfare had reached chronic proportions. During the last twenty years, the ghazu, which had traditionally been short and sharp, had escalated into long, drawn out military campaigns as a result of unprecedented drought and famine. There was an apocalyptic sense of impending catastrophe. Muhammad was convinced that unless the Quraysh reformed their attitudes and behavior, they too would fall prey to the anarchy that threatened to engulf the world.
... The chief vice of the kafirun was jahiliyyah ... although the root JHL has some connotations of “ignorance,” its primary meaning is “irascibility”: an acute sensitivity to honor and prestige; arrogance, excess, and above all, a chronic tendency to violence and retaliation. Jahili people were too proud to make the surrender of Islam; why should a karim moderate his behavior and act like a slave (abd), praying with his nose on the ground and treating the base-born like equals? ...
Instead of succumbing to the jahili spirit, the Qur’an urges Muslims to behave with hilm, a traditional Arab virtue. Men and women of hilm were forbearing, patient, and merciful. They could control their anger and remain calm in the most difficult circumstances instead of exploding with rage; they were slow to retaliate; they did not hit back when they suffered injury, but left revenge to Allah. Hilm also inspired positive action: if they practiced hilm, Muslims would look after the weak and disadvantaged, liberate their slaves, counsel each other to patience and compassion, and feed the destitute, even when they were hungry themselves. Muslims must always behave with consummate gentleness and courtesy. They were men and women of peace: "For true servants of the Most Gracious are they who walk gently on the earth, and who, whenever the jahilun address them, reply 'Peace' (Salam!)"
... After the affair of the “satanic verses,” the conflict with the kafirun became very nasty. Abu Jahl regularly subjected any Muslims he met to vitriolic verbal abuse and slandered them with vicious lies and rumor; he threatened merchants with ruin, and simply beat up the “weaker” Muslims ... It must have been very difficult indeed for the Muslims, brought up in the jahili spirit, to practice hilm and turn the other cheek. Even Muhammad sometimes had to struggle to maintain his composure. (Source: Muhammad: A Biography of the Prophet by Karen Armstrong).
Gandhi's use of spiritual elements derived from indian philosophy and religion in his politics also helped him counter the colonial propaganda that western civilisation was superior because of Christian values. If muslims imbibe the actual philosophy of Islam as advocated by Prophet Muhamed (PBUH) into Gandhi's political philosophy, they too can easily counter the western propaganda of Islam as a militaristic religion of violence and hate.
Another advantage of using Gandhi's political philosophy is that his non-violent means of political protests are now accepted as one of the highlighting feature of democracy as violence in democracy is seen as a failure of democracy. Thus, oppressors who invade a country to make it "democratic" can't use violence against those protesting non-violently, without inviting criticism from democrat of their own country.
His book Hind Swaraj (Indian Home Rule) (PDF) gives an outline of his early political theory. More information on Gandhi's political philosophy can be found on this website - A Place to learn about Gandhi, his life, work & philosophy.
Someone commented:
I found that military invasions were never successfully opposed using Satyagraha. This was used only in the case of securing civil rights. British Raj was toppled only because of UK's bankruptcy due to WW2. Satyagraha was never enough to kick them out.
It is true that satyagraha isn't about fighting an invading army. But the question was never about fighting an invading army, but an occupying force that has already defeated a country. When a country invades another, it is obviously the military forces that fight each other. That is what armies are for, after all, and why every country has one.
Gandhi's political concepts are designed to fight an occupying force that governs you. Note that even though the British occupied and controlled India, they still needed Indians to run the country - the bureaucrats were indians, the police were indians, even the army had indians. (It is the same in, say Iraq or Afghanistan, where the Americans still needed to rely on the locals to administer the country). Gandhi rightly pointed out that if violence was chosen we indians would still be fighting indians, and that only weakens us further. It would give the British another route to use their "divide and rule" policy - for example, by favouring only muslims or or christians or upper caste hindus to run the administration, which would mean any attack on them could be used for communal propaganda. (And in fact, that is exactly what happened in Iraq - the Iraqi resistance fighters that were mostly Sunnis, targeted the Shias and Kurds who the Americans deliberately favoured with the excuse that Saddam Hussein persecuted them for their identity. This further broke the unity of the people of Iraq and helped the occupation. Meanwhile, it provided Iran an excuse to enter the arena to "defend" the Shias against the Sunni muslims, further widening the sectarian gap and increasing conflict, giving the occupying force more excuse to stay and "create" peace.
How would someone know the CIA isn't behind ISIS or Al-Qaeda's rise and sustenance?
which falls securely into the category of conspiracy theory and attempts to abrogate responsibility for Muslim terrorism.