|Donald Trump is now guaranteed to be the 45th president of the United States
The US electoral college has certified Donald Trump as president, despite a last-ditch effort to deny him the White House.
Six weeks after winning the polls, the Republican has secured the 270 votes needed to formalise his victory.
Reacting to his win, Mr Trump promised to “work hard to unite our country and be the president of all Americans”.
Electors had been flooded with emails and phone calls urging them not to support the billionaire.
The voting process is usually a formality, but was clouded this year by claims that Russian hackers tried to sway the presidential election.
Texas ultimately put the president-elect over the 270 threshold, despite two of its electors voting against him.
The New York Times reports that four Democratic electors also cast their votes for someone other than Mrs Clinton.
The result will be officially announced on 6 January in a special joint session of Congress.
“I thank the American people for their overwhelming vote to elect me as their next president of the United States,” Mr Trump said in a statement after the result came in.
“With this historic step we can look forward to the bright future ahead. I will work hard to unite our country and be the president of all Americans,” he added.
Vice president-elect Mike Pence hailed his boss on Twitter, writing: “Congratulations to @realDonaldTrump; officially elected President of the United States today by the Electoral College.”
He added that he was “honored & humbled to be officially elected today as the next Vice President of the United States of America” – drawing thousands of “likes” and retweets.
The movement to block Mr Trump had fought hard to convince Republican electors to abandon their party’s candidate.
Millions of Americans signed an online petition to that effect, while thousands of anti-Trump protesters gathered at state capitols across the country.
In Pennsylvania, over 200 demonstrators braved sub-zero temperatures, chanting, “No Trump, no KKK, no fascist USA!” and “No treason, no Trump!'”
In Maine, protesters beat drums and waved signs saying, “Don’t let Putin Pick Our President,” – a reference to allegations that Kremlin-backed hackers tried to sway the election in Mr Trump’s favour.
Numerically, Mr Trump’s opponents never stood much chance. To keep him out of the Oval Office, 38 Republican electors would have had to defect.
Even that would probably only have delayed the inevitable.
If no candidate reaches 270 in the electoral college, the House of Representatives must vote on the next president, and the Republican-controlled chamber would most likely have chosen Mr Trump.