The US electoral college has confirmed Donald Trump as president despite a last-minute effort to thwart the Republican.
The institution's 538 electors voted at state capitols nationwide, with protesters encouraging them to vote against Mr Trump up to the last minute.
Mr Trump garnered more than the 270 electoral votes required to win, even as at least half a dozen electors broke with tradition to vote against their own state's directives, the largest number of "faithless electors" seen in more than a century.
A handful of Democratic electors had organised a longshot bid to persuade their Republican counterparts to cast ballots against Mr Trump.
In the end, however, more Democrats than Republicans split with their party. Four Democratic electors voted for someone other than Clinton, while two Republicans turned their backs on Trump.
The electorate college vote is usually a formality, but takes place this year amid claims Russian hackers tried to sway the vote.
What is the electoral college?
It was set up by the country'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.
The electors are mostly elected officials or party functionaries whose names are not on the ballot. They are generally unknown to the public apart from one or two exceptions such as former President Bill Clinton, who is a New York elector this year.
There are 538 electors 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. Mr Trump won 306 electors from 30 states.
What are the next steps?
Under federal law, electors must gather on 19 December (20 December in New Zealand), with each elector casting two votes - one for president and one for vice-president.
Their so-called Certificates of Vote must be transmitted by 28 December to Congress and the National Archives in Washington.
On 6 January, US Vice-President Joe Biden will preside as Congress officially tallies the electoral votes.
Once the votes are counted, the results are final, and Mr Trump would be all set for his noon inauguration on 20 January.
Why the controversy this year?
In November's presidential election, Democratic candidate Hillary Clinton won the popular vote by a margin of nearly three million, but only gained 232 electors because she lost crucial swing states. This has fuelled renewed calls for the electoral college to be scrapped, with critics arguing it is undemocratic and unfair.
Furthermore, US intelligence agencies have concluded that Russia hacked the emails of the Democratic National Committee - leaking embarrassing messages about Mrs Clinton's paid speeches to Wall Street and party infighting - in an attempt to put its thumb on the electoral scales for Mr Trump.
Ten electors - nine Democrats and one Republican - asked unsuccessfully for an intelligence briefing about Moscow's alleged role.
On Sunday, Clinton campaign chairman John Podesta upped the ante by suggesting the Trump team could even have colluded with Russia on the cyber-attack, which the Republican's camp denies
Who was trying to thwart Trump?
Millions of Americans who consider Mr Trump unfit to occupy the Oval Office have signed an online petition calling for Republican electors not to vote as directed by their state's popular ballot.
Some posted electors copies of founding father Alexander Hamilton's writings in his Federalist Papers, which state that the meeting of the electoral college "affords a moral certainty, that the office of President will never fall to the lot of any man who is not in an eminent degree endowed with the requisite qualifications".
A handful of Democratic electors are so desperate to stop Mr Trump that they have even offered to vote against Mrs Clinton and unite with the other electors behind a consensus Republican candidate.
Were Trump's electors bound to vote for him?
Nothing in the US constitution or in federal law requires electors to vote one way or another.
Twenty-nine states and the District of Columbia bind their electors by law, though so-called "faithless electors" who defy the popular vote generally just face a fine.
History shows it is extremely unusual for an elector to defy the expressed will of his or her state's voters.
Could electors have stopped Trump?
It was highly unlikely the electoral college would take the unprecedented step of changing the election's outcome.
Only one Republican elector, Chris Suprun of Texas, had come forward to say he will not cast his electoral vote for Mr Trump. But 38 Republican electors would have to defect to deny Mr Trump.
Even that would probably only have delayed the inevitable.
If no candidate reached 270 in the electoral college, the House of Representatives would have had to vote on the next president, and the Republican-controlled chamber would most likely have chosen Mr Trump anyway.