WASHINGTON — Former Trump aide Sam Nunberg’s bizarre media blitz yesterday — openly defying a grand jury subpoena from Robert Mueller and making extraordinary claims against President Trump and others in his orbit, before reversing himself — may have been a bid to protect his mentor: Trump operative Roger Stone.

But in the end, he may have figured out that all it may accomplish — aside from creating a spectacle that drew comparisons to O.J. Simpson’s slow-speed white Bronco chase for the way it captivated Washington — is landing him a jail sentence. After a daylong defiant melodrama, Nunberg backed down, saying he was angry but, “I’m going to end up cooperating with them.”

Earlier, speaking to national news outlets, Nunberg said he had failed to comply with an order from Mueller to turn over emails with Trump’s staff and that he would also refuse to show up to testify before a grand jury Friday despite being offered immunity.

In the process, Nunberg, who Trump fired in 2015, also made a series of jaw-dropping — and unsubstantiated — claims against Trump and those in his orbit.

“Trump may have very well done something during the election with the Russians,” Nunberg told CNN’s Gloria Borger. But he later said he wasn’t sure what Trump had done, or what evidence Mueller has.

“I definitely think he doesn’t know that for sure because he is incorrect,” White House spokeswoman Sarah Huckabee Sanders said, denying Nunberg’s claim.

Nunberg also said Trump knew of the infamous 2016 Trump Tower meeting with Trump campaign officials and a number of Russians claiming to have dirt on Hillary Clinton.

“You know he knew about it. He was talking about it a week before,” Nunberg said on CNN. “I don’t know why he went around trying to hide it.”

Nunberg faces serious legal jeopardy ­— Susan McDougal was jailed in 1996 for 18 months for refusing to answer grand jury questions about Bill Clinton.

White House sources suggested he was either having a meltdown or was intoxicated. CNN’s Erin Burnett told Nunberg she smelled alcohol on his breath, but he denied drinking or taking illicit drugs.

Nunberg said he was only trying to protect Stone. “They are trying to set up a perjury case against Roger Stone, and I’m not going to have it.” Nunberg said. “He’s my mentor. He’s like a father to me.”