Supporters of Democratic presidential candidate Bernie Sanders listen as he speaks Tuesday at the Claremont Opera House in Claremont, N.H. (Matthew Cavanaugh/Getty Images)

While Hillary Clinton barely edged Bernie Sanders to win the Iowa caucuses, one thing became clear Monday night: The race for the Democratic nomination is turning into a battle of the ages.

The dividing line was 45 years old — voters that age or older went decisively for Clinton, while those younger flocked to Sanders. Voters under 30 were the most emphatic, with an astonishing 84 percent backing the 74-year-old senator from Vermont, according to entrance surveys.

Clinton, 68, appears to face a similar problem in New Hampshire, which holds the first-in-the-nation primary next week.

She kicked off her post-Iowa efforts here by touting her razor-thin caucus victory with a midday rally at Nashua Community College, but despite the academic setting, the 1,100-person crowd tilted older.

“Hillary just isn’t trustworthy,” said Amanda Delude, 22, who was headed to her car instead of the rally after class. She said she is likely to vote for Sanders, who she said strikes many in her generation as an uncommonly candid politician.

Democratic candidate Hillary Clinton addresses supporters in Hampton, N.H., on Tuesday. (Jacquelyn Martin/AP)

Chloe Bruning, a 21-year-old Boston University student who attended Tuesday’s rally, said she and other members of the group BU for Hillary were struggling to convince pro-Sanders classmates to give Clinton a new look.

“Clinton fatigue is a thing,” she said. “It really is.”

Younger voters were a problem for Clinton in 2008 as well, when they emerged as a key element of the support base that helped Barack Obama defeat her for the Democratic nomination. In Iowa that year, Obama beat Clinton among caucus-goers under 30, 57 percent to 11 percent.

Clinton’s campaign has said it intends to rebuild the Obama coalition, which included blacks, Hispanics, liberals and young people, while tapping into additional excitement among women over the possibility of the first female president.

Typically, younger voters do not turn out as reliably as older ones. But Monday night’s entrance polls and other opinion surveys suggest a massive advantage for Sanders among those who do turn out — young women and men alike. Ninety-three percent of caucus-goers under 30, for instance, said Sanders shared their values, compared with 53 percent who felt that way about Clinton, helping Sanders surge past Obama’s performance in that age bracket eight years earlier, according to the entrance surveys.

If Clinton wins the nomination, reaching younger voters could be a challenge for her in the fall, particularly if the Republicans nominate 44-year-old Sen. Marco Rubio (Fla.).

Her husband, former president Bill Clinton, told NBC News on Tuesday that Sanders has built a following among young people because he offers them “emotionally satisfying” promises.

Hillary Clinton and Bernie Sanders split the Iowa caucuses nearly evenly — but how? (Peter Stevenson/The Washington Post)

“If you vote for me, I’ll break up the big banks, tax the millionaires and give you free college, cut the cost of health care — end of story,” Bill Clinton said, recapping Sanders’s pitch. He suggested that his wife, on the other hand, would appeal to young people’s sense of realism. “You tell them what you think will really work and what we can afford that will solve the problem, and ask for their help in doing it, and it takes longer,” he said.

Hillary Clinton campaign officials noted that she performed well among many important groups, including minorities and self-described Democrats.

“Her coalition reflects all parts of the Democratic Party, and her agenda of making college affordable, tackling climate change and reforming our criminal justice system speaks to all parts of the Democratic Party, especially younger voters,” said campaign spokeswoman Jesse Ferguson. “She will continue reaching out to them to earn their support.”

In terms of age breakdowns, Clinton won among older voters, and especially older women, on her way to squeaking out her Iowa victory.

A number of young people here, including some Clinton supporters, said Sanders’s appeal has gone beyond the issues. He has managed to capture an intangible quality unexpected for a rumpled grandfather figure with bad hair who has served in Congress for 25 years: He’s cooler than Clinton.

In contrast, the former secretary of state has been in the middle of partisan battles for all their lives.

Emma Sands, 21, another Clinton backer from Boston University, said that campus social media is dominated by Sanders talk. And while the BU group has more women than men, Sands said it offends many young women’s sense of gender equality to suggest gender as a reason to back Clinton.

“I have an issue with the argument that you should like Hillary just because she’s a woman,” she said.

Amy Chapman, 43, who came to hear Clinton speak but said she remains undecided, said she is disturbed by the candidate’s ties to Wall Street banks, which have donated millions to her presidential campaign and from which she and her husband have earned major speaking fees.

“How can you be completely unbiased when you’re taking huge amounts of money from them?” asked Chapman, adding that she may wind up voting for Clinton anyway, out of fear that Sanders would be a weak general-election candidate.

Sonia Almeida, 40, a physician’s assistant from Bedford, N.H., came to the rally with an undecided co-worker. Almeida said she’s convinced that Clinton is the better choice on education, health care and foreign affairs. But she had one piece of advice for the campaign: “They need to be on social media more,” she said. “You didn’t think he’d be so cool there.”

Her co-worker, Celia Ortiz, 36, said Sanders seemed “more genuine.” Ortiz said she works in New Hampshire but lives in Massachusetts, which holds its primary March 1, and was also considering Clinton because she liked the idea of electing a female president.

Clinton enjoys a lot of support at her own alma mater, the all-female Wellesley College in Massachusetts. But there, too, Sanders dominates online, said Laura Prebble, 19, and Juliette Sander, 18, freshmen at the school who said they support Clinton.

“People are always putting up Bernie pictures or Bernie quotes,” said Prebble, who grew up in Wisconsin.

Sander, an international student from France, said some of her classmates liked the idea of a newcomer to the presidential field.

“They like the idea that he’s not part of ‘the Clinton family,’ ” she said.

But the two students agreed that the idea of electing the first female president is powerfully moving to them.

“For me, that’s incredibly meaningful,” Prebble said.

Abby Phillip in New Hampshire contributed to this report.