The ranks of millennial voters have grown over the past two presidential election cycles to now match baby boomers as the largest generation of U.S. voters, according to a recent Pew Research Center analysis of U.S. census figures.

The demographic shift to a younger electorate — one that has come of age in the shadow of the 9/11 attacks and the Great Recession, and is tethered to a constant stream of electronic information — has presented a challenge for presidential hopefuls Hillary Clinton and Donald Trump, baby boomers who polls show have struggled to win over younger voters.

Political experts and pollsters say Clinton, 68, the presumptive Democratic nominee, and Trump, 70, the presumptive Republican nominee, must ramp up their efforts to woo millennials — voters ages 18 to 35 — if they want to win in November.

“It’s one of the voting blocs they have to win,” said Richard Himelfarb, an associate professor of political science at Hofstra University.

Himelfarb said President Barack Obama’s victories in 2008 and 2012 illustrated the critical role the country’s young electorate can play in determining the outcome of an election. Obama’s ability to drive record numbers of young voters to the polls were key in his victories against Sen. John McCain (R-Ariz.) in 2008 and former Republican Massachusetts Gov. Mitt Romney in 2012.

“When young people turn out, Democrats win; when they don’t, Democrats tend to lose,” Himelfarb said. “The huge question is, can Hillary bring those young people back, and can she bring them out to the polls in significant numbers?”

advertisement | advertise on newsday

There are 69.2 million millennials who are old enough to vote in the 2016 election, just shy of the 69.7 million baby boomers, ages 52 to 70, eligible to cast a vote, according to a Pew Research Center report released in May.

Millennials, defined by the Pew center as those born after 1981, have already surpassed baby boomers, those born between 1946 and 1964, as the largest living generation, and with baby boomers declining in numbers since 2004, “it’s only a matter of time before millennials are the largest generation in the electorate,” according to the report.

Heading into the general election, political experts say both campaigns will need to address the distrust most millennials feel toward political institutions. It is a sentiment that for many was first shaped by the contentious 2000 presidential election, when George W. Bush lost the popular vote to Democrat Al Gore but won the presidency, after winning the electoral college in a drawn-out legal battle that involved recounting thousands of disputed ballots in Florida.

“For many, their first introduction to the political process would have been in 2000 . . . which led to this belief that ‘my vote doesn’t count, only the electoral college counts anyway,’ ” said Aaron Ghitelman, communications manager for HeadCount, a Manhattan-based nonpartisan group that organizes voter registration drives at concerts and festivals.

Ghitelman, 25, said those “gripes about the process” resurfaced during this year’s primary, as young voters who supported Clinton’s rival Bernie Sanders in large numbers questioned Democratic Party rules that allowed superdelegates to pledge their support for Clinton — even in states won by Sanders.

“Again there was this belief among some that ‘my vote doesn’t matter, only the superdelegates matter,’ ” Ghitelman said.

More than half of young Americans believe “politics are no longer able to meet the challenges our country is facing,” and only 15 percent believe the country is headed in the right direction, according to a Harvard University poll of voters between the ages of 18 and 29 released in April. The survey polled 3,183 18- to 29-year-old citizens and has a margin of error of plus or minus 2.4 percentage points.

“Young Americans are sending a strong message,” said Harvard Institute of Politics polling director John Della Volpe. “They care deeply about the future but are concerned that the current state of our institutions and our politics are not sufficient to meet our nation’s challenges.”

The poll found Clinton leads Trump among young voters, 61 percent to 25 percent, but both shared low approval ratings. The poll found 53 percent of respondents had a negative impression of Clinton and 74 percent had a negative opinion of Trump.

Clinton’s campaign has looked to bolster her support among young voters by hiring some of Sanders’ former staffers to oversee youth outreach efforts, according to media reports. She also is expected to get a boost from Obama’s endorsement because polls show he remains popular among young voters.

advertisement | advertise on newsday

Meanwhile, the Republican National Committee, which is aiding Trump as his national campaign gets organized, has set up a “GOP Millennial” specific web page, aimed at mobilizing young voters. But experts say most millennials tend to disagree with Trump’s rhetoric, which includes calls for banning Muslims from entering the country, and building a wall along the U.S. and Mexico border.

“What millennials fundamentally care about is not economic issues, it’s not foreign policy, it’s social issues,” Himelfarb said. “The most important thing to them seems to be tolerance . . . what they care about is LGBT rights, they care about abortion, they are more tolerant of the oppressed, which completely goes against the grain of what Trump is speaking about.”

Jeff Guillot, co-founder of Millennial Strategies, a Democratic political consulting firm with offices in Huntington and lower Manhattan, said “the ‘suburban millennial voter’ is the “most critical electorate in this race” because the majority of the country’s swing congressional districts lie in suburbs where millennial voters have grown in numbers but “haven’t come into their own as voters.”

“You don’t win the presidency if you don’t win in the suburbs of Pennsylvania, Ohio, Florida, Virginia, and the other swing states,” Guillot said. “The ability to turn millennials out, and to find a message that is compelling and resonates with their concerns, can be what determines the course of this race.”