The border nations had long avoided joining the alliance in an attempt to stay friendly with Moscow.