Rudy Giuliani threatened to “unload” on Robert Mueller “like a ton of bricks” if the special counsel doesn’t wrap up his Russia probe by the time the former mayor wants him to.

“CNN poll shows 66% say Mueller should complete his investigation before the upcoming elections. DOJ has policy to refrain from investigatory activity in 60 day period before election. DOJ should require Mueller to submit his report before September 7,” tweeted Giuliani, President Trump’s lead lawyer in the case.

Giuliani also told Bloomberg that Mueller should “write the damn report so we can see it and rebut it,” in an interview published Wednesday.

“If he doesn’t get it done in the next two or three weeks we will just unload on him like a ton of bricks,” he said.

But Mueller doesn’t have to shut down the investigation into Russian election meddling and possible collusion with the Trump campaign by any artificial deadline — despite claims by Trump’s lawyers that he faces a Sept. 1 deadline, current and former US officials told the news outlet.

“It’s an absurdity to think that Mueller has to shut down in the coming weeks because of the midterm elections. There is no legal impediment to Mueller continuing his work as we get closer to the election,” said Jeffrey Cramer, a former federal prosecutor.

As a former Justice Department official, Giuliani should know better, said Cramer.

“He’s going to play poker against Bob Mueller? That’s not a smart move. Mueller’s holding all the cards,” he added.

Mueller can continue his inquiry, and even issue new indictments up to and after the Nov. 6 midterms without violating a Justice Department policy against actions intended “for the purpose of affecting any election,” another official told Bloomberg.

That’s at odds with repeated assertions by Trump’s lawyers.

“If it isn’t over by September, then we have a very, very serious violation of the Justice Department rules, and he shouldn’t be conducting one of these investigations in the 60-day period,” Giuliani said last week.

Giuliani as early as May floated the idea that Mueller had to wrap things up by September or “he is clearly doing a Comey.”

The former mayor was referring to a then-FBI director James Comey’s much-maligned decision to announce that he was reopening the probe into Hillary Clinton’s emails days before the 2016 election only to close it again days later.

Clintonistas believe Comey’s actions cost their candidate the election.

But any major step Mueller takes before the election is expected to be vetted and cleared by Justice Department officials, including Deputy Attorney General Rod Rosenstein, who oversees Mueller’s work.

Trump and Giuliani have revved up their attacks on Mueller, with the president tweeting almost daily about what he calls a “witch hunt” and a “hoax.”

Giuliani if also Trump’s most loquacious TV defender, though some of his statements have raised eyebrows.

During a debate with host Chris Cuomo on CNN Tuesday night, he seemed to support the concept of “alternative facts” pushed by White House counselor Kellyanne Conway.

Challenged on the president’s frequent false statements, Giuliani said: “It’s in the eyes of the beholder.”

When Cuomo replied, “No, facts are not in the eye of the beholder” Giuliani fired back: “Yes it is — yes they are. Nowadays they are.”