Hi, Andrew,
This is how great powers tend to look at things—it’s suddenly an existential threat to their security if their prestige is threatened, which makes invasion seem like a reasonable response.
Yes, it is syntactically ambiguous. However, it should be noted that, from a semantic perspective, the redundant use of "threat"/"threatened" practically makes the conditional sentence preceding "which" a unit of meaning: threatened prestige = threatened security.