Republican Donald Trump sealed the presidency Monday, winning the Electoral College in the face of nationwide protests urging electors to vote for other candidates.
Few expected the protests to deprive Trump of the 270 votes he needed to clinch the election.
"This election represents a movement that millions of hard-working men and women all across the country stood behind and made possible," Trump said in a statement.
In Maryland, more than 100 people protested against Trump on Monday at the State House in Annapolis, even though the state's 10 electors inside were bound by law to cast their votes for Democrat Hillary Clinton. Clinton won the state in November with 60 percent of the vote.
"We're here in solidarity with our brothers and sisters across the nation," said Deborah Driver, 62, a protest organizer.
The normally obscure gatherings of 538 electors at sites across the country became national news in recent weeks as anti-Trump activists sought to upend the election results by persuading electors in states Trump won to deny him the presidency.
It would have been unprecedented, and it was unsuccessful.
Electors across the country were barraged with emails, letters and phone calls. By early evening, more had defected from Clinton than from Trump.
Two electors, in Colorado and Minnesota, attempted to vote for someone other than Clinton, who won their states, and were immediately replaced with alternates who did vote for her. In Washington state, four electors chose someone other than Clinton, who won the popular vote there.
Several of Maryland's electors said they felt privileged to vote for the first female presidential nominee from one of the country's two major parties. Protesters outside the State House cheered as the solemn ceremony unfolded on live-stream video.
Del. Maggie McIntosh, who had the ceremonial task of handing the electors' votes to another official, wept as she executed her duty.
"This is an emotional moment for many, many women in this country and in this state," the Baltimore Democrat said.
She added later: "I guess I didn't cry enough on" Election Day.
The Annapolis protesters chanted and sang outside the State House for at least four hours before the vote.
Clinton won the U.S. popular vote by more than 2.6 million votes, but Trump won a majority of electoral votes, the measure by which the presidency is decided.
A nationwide movement, driven almost entirely by Democrats, aimed at persuading Republican electors to vote for anyone but Trump on Monday to deny him the 270 electoral votes needed to win the presidency.
Electing Trump "is appalling and unacceptable, and I'm hoping the Republicans, in particular, rise above and do the right thing," Cheryl Kreiser said before the vote.
Kreiser, a retired teacher from Silver Spring, said she has spent an hour every day since the election on the steps of the Lincoln Memorial protesting Trump's win.
"It was the only way I could cope with the disappointment," she said.
Maryland Gov. Larry Hogan, a Republican who wrote in his father's name on the ballot to avoid voting for Trump, opened Maryland's 58th Electoral College meeting. But he left the room before electors were sworn in.
Each elector was appointed by the Maryland Democratic Party state chair, Bruce Poole, who reminded the crowd that the United States is not a direct democracy ruled by the popular vote.
"A lot of people lose sight of the fact that we're a republic," Poole said. "We're not a democracy.
"The whole idea was that the president would not be chosen just by the whims of the moment, but instead there would be an opportunity for people who were thoughtful, who had judgment, who had integrity to take a step back from the moment of emotion and consider what would be in the best interest of the country."
Poole lamented the state of political discourse in the country.
"We live in the age of information," he said. "It is not necessarily the age of wisdom or age of judgment. People on both sides, on all sides, make decisions at the snap of a finger."
Maryland was both the model for creating the Electoral College and the first state in the country to vote to bypass it.
The framers of the Constitution, meeting in 1787 and 1788, modeled the system on the way the Maryland House of Delegates then selected state senators.
The state abandoned that process in 1836 after it was determined to be "undemocratic," according to a history of the Electoral College written by staff at the Maryland State Board of Elections.
Hogan noted that Maryland is one of six states to have participated in the Electoral College vote every year since 1789.
In 2007, Maryland became the first state vote to sign the National Popular Vote Interstate Compact, a promise to award the Electoral College to the winner of the national popular vote.
To take effect, it requires states representing 270 electoral votes to sign on. So far, 10 states with a combined 165 votes have signed the compact.
Maryland Policy & Politics
Electors are typically party loyalists. The president of Maryland's electors, Courtney Watson, co-chaired Clinton's campaign in Maryland.
Watson described Monday as a poignant moment for Maryland residents.
"It's a very emotional time," she said. "Many of us have worked long and hard, and for the first woman candidate.
"The point, though, is that people are still moved and even more engaged. And that's what I find promising for our future and the future of women."
The Los Angeles Times contributed to this article.