Three years of war have upended alliances, weakened US influence and reshaped the regionβs power balance.