Hillary Clinton has dramatically reversed her struggles with youth voters and is now on track to do about as well with them as Barack Obama did in 2012 — a result that seemed inconceivable just a few weeks ago.

Through most of this fall, it looked like Clinton was letting young voters slip away from the Democratic coalition. She was running way behind Obama among this voting bloc, by as many as 25 points. Some polls had her down to the low 40s among those under 30, setting off a flurry of liberal panic about millennials’ “third-party revolution.”

But if the latest polling is right, this challenge has mostly if not completely dissipated. Young people considered Libertarian presidential candidate Gary Johnson and toyed with staying on the couch on Election Day — they have instead decided to come back into the Democratic Party tent.

Clinton is now projected to get exactly the same youth vote share as Obama did in 2012 (60 percent), according to a massive new study released Monday by the Black Youth Project at the University of Chicago, as part of its GenForward survey series. It’s a stunning turnaround for a campaign that has faced months of fierce criticism and second-guessing over its apparent inability to shore up its millennial support.

“Over time, young voters have really come to think that Gary Johnson doesn’t represent their interests, that [Green Party candidate] Jill Stein is not going to win, and that the stakes are very high in this election,” says Cathy Cohen, a political scientist at the University of Chicago and the study’s lead author, in an interview. “And while they still don’t have great love for Clinton, it looks like they’ve decided to vote for her.”

Clinton seems to have largely erased her young voter problem

Of course, Clinton has done better in the polls overall in the past few months. Back in mid-September, when her numbers with millennials hovered around the 30s, Clinton was only beating Donald Trump by a narrow 41-to-40 margin.

The race has since widened considerably — Clinton is now out to a 45-to-39 lead in the RealClearPolitics polling average. So it’s not surprising that she’s improved her numbers with young voters as part of that bigger shift.

Still, there’s very strong evidence that her support with millennials has increased at a much faster clip than it has with the rest of the voting public — particularly in the wake of the presidential debates.

“There's a ton of sound pieces of evidence to suggest that something big has happened here,” says political scientist John Della Volpe, who studies youth voting patterns for the Harvard Institute of Politics.

A few key data points that show this is a real, honest-to-goodness thing:

GenForward, the most comprehensive youth voter study in the country, pegged Clinton at below 40 percent of voters ages 18 to 30 headed into the fall. It now shows her pushing 60 points — a huge 20-point swing.

Morning Consult also has Clinton’s youth voter support surging — by about 11 points over the past month. (Morning Consult has her lead overall going up by only 2 points over the same period of time.)

Della Volpe told me he’s also seen a massive increase in support for Clinton during his interviews with young voters. That’s particularly the case among young women appalled by the series of sexual assault allegations against Donald Trump, he said.

A new Rock the Vote/IPSOS/USA Today poll also puts Clinton’s youth voter support now right around 60 points. Young voters’ movement to Clinton has pushed her up by 2 percentage points in the overall polls, and so account for nearly half of the lead she’s opened up over Trump, says Chris Jackson, vice president for public affairs at IPSOS.

There are a lot of reasonable theories as to why young people have come into the Clinton camp. But the overall trend line is impossible to dispute: The youth vote stampede from the Democratic Party may have ended almost as soon as it began.

Why young voters shifted back toward Hillary Clinton

It’s going to take time for experts to pinpoint just what’s driving this trend. But a big part of the shift seemed to come during the debates.

“From my interviews, it was clear that a fairly significant number of young people hadn’t really seen [Clinton] perform in a long format until then,” Della Volpe says. “An overwhelming majority of millennials saw her with fresh eyes — and, generally speaking, they liked what they saw.”

Beyond that, young voters who were undecided or gettable never really fell in love with Johnson or Stein. “Young people were looking for an opportunity to connect with a third-party candidate,” Della Volpe says.

It never happened. Both Della Volpe and Cohen said that Gary Johnson really was wounded in young voters’ eyes by his "Aleppo moment," in which he failed to be able to name the Syrian city. Young voters were also turned off by his positions on climate change, Cohen says. And during the presidential debate, which was viewed by millions, many of them saw a stark contrast between the two major party candidates.

“They’re beginning to think about this in a more practical way,” Della Volpe says. “They’re seeing a big difference between Clinton and Trump.”

Now, Clinton has opened up as big a lead over Trump with young voters as Obama had over Mitt Romney — about 23 percent. “She has definitely shored up her position with young voters,” said Reuters’s Jackson.

Still, while young voters are prepared to back Clinton to stop Trump, the polling suggests they'll do so far more begrudgingly — and with far less enthusiasm — than they supported Obama. And that suggests while the weakness of the third parties and the menace posed by Trump allowed the Democrats to cement their hold on youth voters this time, it may be harder to do so during the next election.

“I think they’ll be open to another party, led by the candidate they respect, who looks like the Bernie [Sanders] mold,” says Cohen, of the University of Chicago. “If I was the Democratic National Committee, I’d be careful not to be smug about this. They have some real difficulties in needing to shore up this voting base for the future.”