Former President Donald Trump has defeated  his Democratic rival Kamala Harris in the US presidential election, sealing an improbable comeback that is expected to pitch American democracy, US alliances and global markets into an era of upheaval.