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 January 6 in a special joint session of Congress.
‘Thank you tweet’
“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 “honoured and humbled to be officially elected today as the next Vice President of the United States of America”, drawing thousands of “likes” and retweets.
The Electoral College
It was set up by America’s founding fathers as a compromise between allowing Congress and the people to elect the president.
Technically, Americans cast votes on Election Day for electors, not the candidates themselves.
Mr Trump won the majority of these electors, 306, although Democrat Hillary Clinton secured almost three million more votes from the public.
As a result, he won the election.
The electors are mostly elected officials or party functionaries and are generally unknown to the public.
There are 538 in all, one for each member of Congress. A candidate needs to take at least 270 electoral votes, half of the total plus one, to win the White House.
In November’s presidential election, Mr Trump’s 306 electors came from 30 States.
Under US law, electors must formally vote for the president and vice-president before they can lead the country.