He threatened to end his nation's decades-old alliance with the United States in favour of China and Russia.