Ibn Taymiyyah, may Allah have mercy on him, said, “It is said that Allah allows the just state to remain even if it is led by unbelievers, but Allah will not allow the oppressive state to remain even if it is led by Muslims. And it is said that the world will endure with justice and unbelief, but it will not endure with oppression and Islam.”
Source: al-Amr bil Ma’rūf 1/29
The past is replete with lessons of what lead to the rise and fall of nations, lessons waiting for us to take heed from. We must parse through the pages of history, and be willing to learn about the Sunnah of Allah, and what is our task to turn apparent defeat into victory, pleasing to Him SWT.