In October 2008, in the midst of the financial crisis, Berkshire Hathaway CEO Warren Buffett made a late-night phone call to then-Treasury Secretary Henry "Hank" Paulson, with an idea about how the government might be able to turn the economy around.

Paulson was asleep. He'd had a busy night working through various policy ideas with his team to restore confidence in Wall Street.

"I was exhausted," he recounts on Vice Special Report's "Panic: The Untold Story of the 2008 Financial Crisis," a documentary that debuted Monday night on HBO. It features interviews with private sector and government officials on the front lines of the crisis, including former Presidents Barack Obama and George W. Bush.

At the time, Congress had just passed the Emergency Economic Stabilization Act, or the "bailout bill" as it came to be known, and created a $700 billion Troubled Assets Relief Program to purchase assets of failing banks. But these actions were not enough to calm investors.

WATCH: In-depth interview with Warren Buffett on the 2008 financial crisis

"While we were getting this legislation in Congress, the situation worsened. We had the two biggest bank failures in U.S. history with Wachovia and Washington Mutual," says Paulson. "We needed something that was going to work much quicker and be more powerful."

As experts scrambled in an effort to figure out a solution, Buffett reached out with his idea.

Buffett's proposal

At first, having just woken up and not expecting the call, Paulson was confused, and he wasn't even sure who was on the phone: "My mom has a handyman named Warren. I'm saying, 'Why is he calling me?'"

Once he understood what was going on, Paulson says, he listened as Buffett "laid out an idea which was a germ of what we did."

What he told Paulson, Buffett recalls, is that, "It might make more sense to put more capital in the banks than it would to try and buy these assets."

On Oct. 13, the CEOs of major banks — including John Mack of Morgan Stanley, Jamie Dimon of J.P. Morgan, Lloyd Blankfein of Goldman Sachs, John Thain of Merrill Lynch, and Vikram Pandit of Citigroup — convened at the Treasury to discuss the proposal.

Not all of the banks needed assistance at that time, and some of the CEOs were reluctant to accept cash out of fear that it might signal to the public that they were struggling and prompt investors to pull out. But Paulson insisted that the bailout was necessary to renew faith in the economy, and everyone eventually agreed.

"Look, if I get lucky, my board will fire me, and I'll get out of all this craziness," Mack recalls saying.

The meeting ultimately led the Treasury to inject $250 billion into the banking system, drawing funds from TARP.

Reactions to the bailout

The plan was not universally well-received. Protesters took to the streets to express disapproval over the fact that taxpayer money was used to bail out wealthy Wall Street investors, whose bad judgment, many felt, triggered the crisis in the first place.

"CASH for TRASH?" one sign read. "Bail Out Working People, Not the Rich!" read another.

"I think there are still many people who believe that we bailed out companies and helped Wall Street because we were trying to help our friends in the financial industry, and not out of our interest in defending the U.S. economy," says former Federal Reserve Chair Ben Bernanke.

Paulson, Bernanke and New York Fed President Timothy Geithner say they bailed out Wall Street to help Main Street. Though the three officials concede that they didn't do a perfect job in dealing with the crisis — they failed to save Lehman Brothers from collapse, for instance — they stand by their decision to pump money back into the economy through the banks.

The intervention, I think, probably saved a depression.
Former President George W. Bush

The market has steadily recovered since 2009, Paulson notes, which is why he calls the bailout "the most successful program that is broadly hated in the history of mankind."

It was "probably the greatest financial bailout ever," agrees Bush. Though he can't prove it, he says, "the intervention, I think, probably saved a depression."

Anticipating the next crisis

Though the U.S. economy eventually bounced back from the 2008 crisis, some experts foresee that inadequate banking regulation could cause another crisis in the near future.

On Monday night, the former Federal Reserve Chair Janet Yellen said that leverage loans are an area of concern. "I think things have improved, but then I think there are gigantic holes in the system," she said. "The tools that are available to deal with emerging problems are not great in the United States."

In September, Buffett said another financial crisis is inevitable, thanks to the same fundamental human traits that contributed to the one 10 years ago: jealousy and greed. Unfortunately, he said, "that's a permanent part of the system."

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: Once you hit this credit score, going higher is a 'waste of time,' expert says