Erich Schlegel/Getty Images Hillary Clinton courted Latino votes throughout her campaign, including at this "Latinos for Hillary" event in San Antonio in October 2015.

Latinos came out in large numbers to vote against the candidate who disparaged a judge for having Mexican parents, promised to build a wall on the southern border, accused Mexico of sending rapists and criminals into the U.S. and vowed to dramatically ramp up deportations.

It didn’t work.

A Latino Decisions poll released Tuesday showed Latino voters favored Democrat Hillary Clinton over Republican Donald Trump in the days leading up to the election by a massive margin of 79 percent to 18 percent. Exit poll results as of early Wednesday morning showed Clinton far ahead of Trump among Latino voters. But the Latino vote wasn’t enough to prevent a Trump victory.

Ahead of the election, Trump appeared poised to establish a record low for a presidential candidate’s performance with Latino voters in recent times. For comparison, the poorest-performing candidate among Latinos in traditional exit polls since 1980 was Republican Bob Dole, who won just 21 percent of the Latino vote in 1996 in his race against Bill Clinton.

The precise margin by which Trump lost Latino voters isn’t clear yet, but early indications are that he did badly, but better than anticipated ― exit polls put him at 29 percent support from Latinos to Clinton’s 65 percent. That was a smaller margin than the one between President Barack Obama and then-Republican presidential nominee Mitt Romney in 2012.

Trump’s loss among Latino voters was not surprising. In him, Republicans chose a nominee who alienated many Latinos right off the bat, and the campaign was never able to win them back.

Yesenia Tanchez, 20, voted in her first presidential election at Yorkshire Elementary School in Manassas, Virginia. She said her parents, who moved to the U.S. from Guatemala three decades ago, voted for the first time this year as well, although they were not with her Tuesday. They became citizens this year, after being legal permanent residents for 28 years, because they wanted to vote, she said.

“I voted for Hillary because Trump just wants to build a wall and thinks everybody that comes to their country is illegal ... and they are criminals,” Tanchez said. “My parents aren’t criminals; they came here to have a better future for us.”

Trump’s stance on immigration wasn’t the only thing that kept Latinos from voting for him. Gabriel Madriz, 23, also at Yorkshire Elementary, said he voted for Clinton because he’s always supported the Democratic Party. As for Trump, he said his opposition went beyond the candidate’s comments on Latinos.

“I just don’t think he’s fit to be president,” said Madriz, who was born in the U.S. to parents originally from Nicaragua.

The lopsided Latino vote fits into a broader trend for Republicans that could prove to be disastrous for the party’s prospects. More than 27 million Latinos were eligible to vote this year, including 3.2 million who were eligible to vote in a presidential election for the first time because they had turned 18 since 2012. Millions more will turn 18 by the 2020 presidential election.

Republicans said four years ago that they’d learned their lesson when Romney earned less than 30 percent of the Latino vote in his bid to unseat Obama. That lesson didn’t stick.The question now is whether there will be another reckoning this year.

Trump consistently polled far below Clinton among Latino voters, and grassroots organizations were able to use his unpopularity to get out the vote. Latino groups reported registering hundreds of thousands of voters ahead of the 2016 election.

Robyn Beck/AFP/Getty Images Latinos, immigration and workers' rights advocates, and their supporters protest against Donald Trump in the Los Angeles area in September 2015.

Those get-out-the-vote efforts continued on Election Day. The political advocacy nonprofit CASA in Action sent out 44 people across Virginia to knock on doors Tuesday and encourage people to vote.

Three of the canvassers met at a Mexican restaurant in a Manassas strip mall in the morning before setting off to talk to voters in the neighborhood. They said they hadn’t come across many Latino Trump supporters. Jennifer Romero, a 19-year-old canvasser, said she had encountered only one over months of knocking on doors.

Sometimes they came across people who weren’t enthusiastic about voting, Romero said, but then she would share her own story: She is undocumented but able to stay in the U.S. with temporary work authorization under the Deferred Action for Childhood Arrivals, or DACA, recipient. She cannot vote.

“You have that privilege that people like me don’t have,” she would tell those who were eligible to vote but who weren’t sure it was worth the trouble.

Trump repelled Latino voters from the start. In his June 2015 speech announcing his candidacy, he accused Mexico of sending criminals, rapists and drug dealers over the border ― and promised he’d ensure a wall was there to stop them.

Trump also drew criticism when he said that U.S. District Judge Gonzalo Curiel, who was born in Indiana, was biased against him in the Trump University case because the judge’s parents were born in Mexico. Even House Speaker Paul Ryan (R-Wis.) said those comments fit the “textbook” definition of racism.

Trump did a poor job even maintaining his few Latino supporters. In September, members of his National Hispanic Advisory Council quit after he delivered a speech on immigration that made it clear he was not softening his stance on mass deportations.

Both the harsh immigration rhetoric and the dismal results marked a shift from the George W. Bush campaigns, which embraced immigration reform and made a virtue of his friendship with then-Mexican President Vicente Fox. Bush won 44 percent of the Latino vote in the 2004 election; no Republican has done as well since.