Donald J. Trump will be the next president of the United States.

That's been the case since Nov. 8, when Trump won 306 electoral votes, despite losing the national popular vote to Hillary Clinton by nearly 3 million.

And on Monday, the result was ratified by Electoral College voters, who gathered in state capitols across the United States to formally vote for president.

Trump secured 304 electoral votes — two fewer than he earned in November, according to the Associated Press, which tracked results from capitol to capitol. That was despite a pitched effort by some on the left who wrote letters to Trump electors trying to persuade them to switch their votes or not vote at all and keep Trump short of the 270 needed.

Not only did it not happen, but more electors tried to defect from Hillary Clinton Monday than from Trump, by a count of seven to two, as of Monday afternoon. Three Democratic electors in Maine, Minnesota, and Colorado tried to vote for candidates other than Clinton. The electors' votes, however, were disallowed because of state rules binding them to the statewide popular vote winner.

Four more electors in Washington state defected from Clinton. Three voted for Colin Powell and one for Faith Spotted Eagle, a Native American who gained some notoriety for her protest of the Dakota Access Pipeline.

Some of the Democratic electors tried to vote for Sanders. Others, including the Powell voters in Washington, were attempting to promote alternate Republican candidates that the House of Representatives could theoretically elect as president instead of Trump.

The Electoral College gathering is usually a formality — a chance for political activists to gather amid pomp and circumstance to formalize their party's victory in each state.

But the fact Clinton won the national popular vote by such a large margin, combined with the unconventional and unpredictable — and to many, threatening — way that Trump carried himself before and after winning the White House, led to an unprecedented effort to lobby electors to vote for someone else.

Electors found themselves inundated by letters, petitions, tweets and Facebook posts, urging them to cast a ballot for an alternative candidate.

Many people behind the lobbying campaign cited a Federalist Paper written by Alexander Hamilton, which frames the Electoral College as a safeguard against "foreign powers" that try to "gain an improper ascendant in our councils" — a potentially relevant line, in the midst of revelations that Russia attempted to disrupt this year's election by hacking and releasing Democratic emails.

Hollywood celebrities even got in on the act, recording video pleas to electors. But, unsurprisingly, that effort had no effect on Trump electors.

"They don't understand us," said Pennsylvania elector Ash Khare. "I received over 70,000 emails. I received over 5,000 letters. I received over 500 phone calls at all times of day and night." But Khare, like most electors, is a longtime Republican political activist who was proud to cast a ballot for Trump.

"I've been an elector since 1996," Khare told Harrisburg public radio station WITF. "But I've never been asked to do anything because we never won since 1988."

Maine elector David Bright announced Monday morning that he would cast a ballot for Sanders. But Bright ultimately changed his vote to Clinton, after his initial ballot was ruled out of order.

A Minnesota elector, Muhammad Abdurrahman, tried to vote Sanders, according to Minnesota Public Radio reporter Brian Bakst. He was replaced by another elector who cast a ballot for Clinton.

Two Texas electors defected from Trump — one went for Ohio Gov. John Kasich, the other for former Texas Rep. Ron Paul. The Kasich defector, Chris Suprun, told The Hill beforehand his plans. Another Texas elector, Art Cisneros, resigned instead of voting for Trump. He spoke to NPR earlier this month.

Many Republican electors dismissed the pleas to "vote their conscience," pointing out that their consciences were perfectly fine with Trump.

With protesters heckling from the gallery of Pennsylvania's House chamber, Pennsylvania elector Robert Gleason seemed to pointedly respond to their efforts.

"My fellow electors," Gleason said, "let us always remember this shared moment when we stood up for our constitutional system, followed our conscience, answered the call of Pennsylvania voters, and did our part by electing the next president and vice president of the United States, Donald Trump and Mike Pence."

On Monday night, Trump issued a statement saying, "today marks a historic electoral landslide victory in our nation's democracy." In fact, in nearly 80 percent of previous presidential elections, the winning candidate earned a larger share of the electoral vote than Trump.

There are two more steps in the process. States will submit a "certificate of vote" to the Federal Register by Dec. 28. Then, on Jan. 6, Congress will formally tally the Electoral College's votes in a joint session and make it official.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.