In the midst of economic chaos, Warren Buffett recently made a bold prediction. He said that now is the time to buy American stocks.

Of course, this call seems utterly insane. Banks are failing, the credit markets are deadlocked, unemployment is skyrocketing, and there's likely to be terrible news for months.

On the other hand, this is Warren Buffett, and he's made these sorts of predictions before.

1974: Stagflation
The years 1973 and 1974 were two very bad ones for the market. OPEC had started flexing its muscles, causing oil to quadruple. This resulted in a long recession, with inflation spiking to 12.3% in 1974, while real GDP growth fell by 0.5%. America experienced stagflation -- the ugly combination of a recession and high inflation rates -- and people were terrified. The situation was even worse in the United Kingdom, where the government was bailing out banks after real estate crashed. Over those two years, the S&P 500 plunged by 42%.

It was then, on Nov. 1, 1974, at the height of the pessimism, that Buffett made his first well-publicized bullish market call. He noted that he was well aware that the world was in a mess, but that stocks were simply too cheap. "If you're only worried about corporate profits, panic or depression, these things don't bother me at these prices."

To be totally clear, Buffett made one of the most direct predictions of his entire career: "Now is the time to invest and get rich." Buffett himself was buying shares of The Washington Post (NYSE:WPO) and advertising agency Interpublic (NYSE:IPG).

It worked out pretty well for him. The market jumped 32% in 1975, and another 19% the next year. Even today, the Dow Jones Industrial Average's 38% gain in 1975 stands up as its biggest increase since 1955.

1979: An oil crisis
That excellent performance was followed by two poor years. Once again, we were experiencing double-digit inflation and falling GDP growth. Again, we were going through an oil crisis, this one coming in the wake of the Iranian Revolution. As a result, when Buffett made his next call on Aug. 6, 1979, the Dow Jones Average was actually trading lower than it was at the end of 1975.

This time, Buffett noted that stocks were far more attractive than bonds. He believed that pension managers, who were piling into bonds yielding 9.5%, were investing using the rearview mirror. They were avoiding the equities that had recently lost them money. But Buffett recognized that the underlying businesses were actually performing well. A combination of falling stock prices and improving business fundamentals made stocks an attractive investment.

Buffett figured that stocks were probably offering long-term returns of 13% or better. He bought oil producer Hess (NYSE:HES), GEICO, and General Foods, which later became part of Kraft (NYSE:KFT).

This time, Buffett's timing wasn't perfect -- the S&P 500 fell a bit more over the next few months. But his long-term prediction was spot-on. During the 1980s, the S&P 500 rose 13% annually before dividends.

1999: The Internet bubble
In November 1999, during the height of the Internet bubble, Buffett made his only bearish call. At the time, the market was in a speculative fervor, with Internet stocks showing huge price increases seemingly every day. In the five years between 1995 and 1999, the S&P 500 tripled, with compound annual returns of 26%. Many considered Buffett a relic for refusing to buy into the technology boom.

Buffett, however, noted that, because of a combination of cheap initial valuations and falling interest rates, stocks had achieved unprecedented annual returns of 19% over a 17-year period. These results made investors unreasonably optimistic. New investors were expecting 10-year annual returns of 22.6%, while even experienced investors predicted 12.9%. But the huge boom was only supported by modest GDP growth, and therefore wasn't sustainable. So, Buffett expected about 4% real returns.

He continued to hold Coca-Cola (NYSE:KO), Wells Fargo (NYSE:WFC), and M&T Bank (NYSE:MTB), though he noted in the 2004 annual report that he should have sold some of Berkshire Hathaway's overvalued holdings.

Buffett's bearish prediction proved optimistic. The market continued to rise for a few months, with the S&P 500 topping out 9% above where it was when Buffett made the call. But that was followed by a crash. Since his call, the S&P 500 has dropped by 39%, for average annual losses of about 5%, well below Buffett's estimates.

The Foolish bottom line
The common theme of all these predictions is that Buffett didn't care about short-term fears. He wasn't worried about stagflation in the 1970s, and he didn't buy into the unrealistic optimism of the late 1990s. Instead, he rationally valued stocks, and made the right long-term calls. His biggest mistake was the 4% number he threw out in 1999 -- long-term returns have been much worse than his bearish prediction.

But that prediction was too optimistic partly because stocks are so unreasonably cheap right now. And that's why Buffett's buying today.

If you're a short-term speculator, now is a bad time to gamble. But if you're truly in it for the long term, Warren Buffett has made the call. He thinks stocks are cheap. And we agree with him. Our Motley Fool Inside Value team is astounded at the bargains that we're finding right now. You can read about them by taking a 30-day free test-drive.

Fool contributor Richard Gibbons is terrified, but still thinks this is the time to invest and get rich. Kraft is an Income Investor recommendation. Coca-Cola and Berkshire Hathaway are Inside Value picks. Berkshire Hathaway is also a Stock Advisor selection and Motley Fool holding. The Fool's disclosure policy predicted a McCain victory.