I believe there is no legitimate power or illegitimate power. There is only power.
If you view a particular instance of power as ‘illegitimate,” it’s probably because you are on the other side of it.
Even legitimate power—say, the power granted a rightfully elected president by a constitution—depends on the power, pure and simple, whose exercise made said constitution an arbiter of legitimacy in the first place.
For example, the conquest of the territory now referred to as the United States of America bestowed legitimacy on the constitution of these United States. The only thing that bestowed legitimacy on the conquest was the fact that it occurred.
Were the conquered able to reverse their fate, the result, however gratifying, would be a power no more or less legitimate.