The FBI got a warrant to search Anthony Weiner’s laptop for new evidence in the Hillary Clinton email scandal, setting off a mad dash to try to finish the massive job before Election Day, law enforcement sources told The Post on Sunday.

Weiner shared the laptop computer with his now-estranged wife, top Clinton aide Huma Abedin, and the feds believe there are around 650,000 emails stored on it, with many from Abedin’s accounts, the Wall Street Journal reported.

“FBI agents are reviewing the emails as we speak,” one source told The Post.

Metadata found on Weiner’s laptop computer — seized as part of an investigation into his explicit online relationship with a 15-year-old girl in North Carolina — suggest it may hold thousands of emails sent to or from Clinton’s private server, sources said.

It was unclear how long the search would take, but an official briefed on the matter told The Post that the job would extend past Nov. 8, when the vast majority of Americans go to the polls.

“There are too many emails to sift through before the end of the election and that is why [the Department of Justice] was cautioning [FBI Director James] Comey not to make the announcement,” the official said.

“The FBI won’t be able to look through them all and now they risk looking political.

“Many of these emails appear to be redundant. That’s to say that since Huma was on Hillary’s staff, she was apparently copied on a lot of them. Investigators have probably seen them before. Now will all of them be redundant? No, that won’t be the case for all of them,” the official added.

Agents have probable cause to search only those that relate to the Clinton probe, and they’re only expected to seize a portion of the huge cache, a law enforcement source told The Post.

Hours earlier, Clinton opponent Donald Trump — who’s previously blasted Weiner as a “pervert” and a “major, major, major sleaze” over his sexting habit — publicly hailed the disgraced ex-pol for inadvertently reviving the FBI probe.

“We never thought we were going to say thank you to Anthony Weiner,” the Republican presidential nominee told thousands of cheering supporters at the Venetian Hotel in Las Vegas.

Trump crowed about Weiner’s potential new role in the Nov. 8 election as a new ABC/Washington Post poll showed him just 1 point behind his Democratic opponent, who held a 12-point lead in the same poll last Sunday.

The Abedin emails were discovered several weeks ago, with agents in New York alerting FBI Deputy Director Andrew McCabe, the bureau’s second-in-command, about their existence, sources told the Journal.

McCabe has recently come under fire from Republicans in Congress over the failed 2015 Senate candidacy of his wife, Dr. Jill McCabe, which got $467,500 in contributions from the political action committee of Virginia Gov. Terry McAuliffe, a longtime Clinton loyalist.

Senior FBI officials decided that the agents investigating Weiner should further examine the metadata and report back, and a member of the Justice Department’s senior national security staff asked for an update during a meeting early last week, according to the Journal.

Officials then realized no one had sought a warrant to examine the emails, and McCabe ordered that investigators figure out if the laptop’s contents could relate to the Clinton email probe — and they determined they might, The Journal said.

Amid the controversy over her emails, Abedin abandoned the campaign trail and took a back-bench seat at Clinton’s headquarters in Brooklyn on Sunday while the candidate stumped for votes in the battleground state of Florida.

Meanwhile, Clinton campaign director Robby Mook revealed that Clinton — who on Friday demanded that the FBI “release all the information it has” from Weiner’s computer — hasn’t asked Abedin what’s in her emails.

But Mook refused to say why when pressed six times by anchor Chris Wallace, who at one point asked, “Why on Earth wouldn’t Hillary Clinton say to her closest personal aide: ‘Was there any stuff on your laptop, and what was it?’”

“Chris, again, I appreciate your question because people want answers. There’s nothing about Huma Abedin in the letter that was sent out [on Friday by Comey],” Mook replied.