Donald Trump was elected US president, capping a remarkable comeback four years after he was voted out of the White House and ushering in a new American leadership likely to test democratic institutions at home and relations abroad.Trump, 78, recaptured the White House Wednesday after a campaign marked by dark rhetoric that deepened the polarisation in the country, prevailing after two attempts on his life and a late decision by Democrats to run Kamala Harris when President Joe Biden withdrew from the race in July.The former president's victory in the swing state of Wisconsin pushed him over the 270 Electoral College votes needed to win the presidency. As of 1300 GMT Trump had won 279 electoral votes to Harris' 223 with several states yet to be counted, Edison Research projected.He also led Harris by more than 5mn votes in the popular count."America has given us an unprecedented and powerful mandate," Trump said early Wednesday to a roaring crowd of supporters at the Palm Beach County Convention Center in Florida.Republicans won a US Senate majority, but neither party appeared to have an edge in the fight for control of the House of Representatives where Republicans currently hold a narrow majority.Major stock markets around the world rallied following Trump's victory, and the dollar was set for its biggest one-day jump since 2020.