After nearly two years of turmoil, the stock market finally did something during the second quarter that it hadn't done since 2007: It went up. And while the impressive recent rally decisively lifted stocks of all kinds from their 2009 lows, the winners of the quarter once again proved that a particular type of stock typically outperforms the broader market -- especially as signs start to point toward the possible end to the recession.

Stocks rose more or less across the board. The Dow gained 11%, while the broader S&P 500 rose over 15%. Internationally, stocks put in similarly strong results: The British FTSE index jumped 8%, Japan's Nikkei saw a 23% increase, and Chinese stocks gained nearly 25%.

But perhaps most striking was how small-cap stocks beat their larger counterparts here in the U.S. Even though it didn't beat some of the international markets, the Russell 2000 small-cap index rose over 20%, easily surpassing the performance of large-cap indexes like the S&P 500. Moreover, when you look at some of the top stocks among large-caps and small-caps, you can see the difference:

Stock

Market Cap

Return During 2nd Quarter

Dollar Thrifty Automotive (NYSE:DTG)

$303 million

1,103%

Avis Budget Group (NYSE:CAR)

$575 million

521%

Cott Corp. (NYSE:COT)

$392 million

470%

Ford (NYSE:F)

$17.4 billion

131%

ICICI Bank (NYSE:IBN)

$16.4 billion

125%

Barclays (NYSE:BCS)

$37.6 billion

117%

Bank of America (NYSE:BAC)

$84.5 billion

94%

Sources: Yahoo! Finance, Google Finance.

According to the screener on our Motley Fool CAPS service, over 60 small-cap stocks -- defined for these purposes as companies with market caps between $250 million and $1 billion -- saw their shares double or more in value during the past 13 weeks.

Why did small caps shine?
A number of things explain why small caps bounced back more strongly than large caps during the second-quarter rally. But first, we can eliminate the reason you might have expected: It wasn't that small caps had fallen any further than large caps since the bear market began. From their October 2007 highs to their March 2009 lows, the Russell 2000 fell almost 60%, but the S&P fell 58% -- no substantial difference.

Instead, the secret to why small caps have outperformed large caps this time lies in some of the peculiar traits of this particular downturn. Many large companies have found themselves in the unforeseen situation of not being able to access the capital markets -- at a time when many of them desperately needed funding. That came as a shock to many companies, which saw the ability to get cheaper financing as one of the primary advantages they derived from their size.

Meanwhile, some small caps, which are no stranger to the challenges of more difficult financing, were able to navigate the downturn more effectively, putting themselves into position to reap the benefits of a recovery sooner than their competitors. And those that succeeded against the tough odds of the recession have seen their shares rocket ahead in the recent recovery.

No surprise
Of course, those who've followed the Foolish way of thinking for a while shouldn't be shocked at how things have played out. After all, it's a lot harder for a $30 billion company to double in size than it is for a $300 million company -- and the $300 million company has a lot more room to double over and over and over again.

Perhaps the most important lesson learned from this bear market is that just because you know large-cap companies better than many small-cap companies doesn't make those blue chips immune from risk. Giants like General Motors and AIG can fall from grace as easily as smaller companies. This makes it that much more important to seek out companies without lots of baggage -- small companies that have plenty of room to run, along with driven, experienced management and the financial resources to grow to their full potential.

There's no guarantee that stocks will rise in the third quarter, but eventually, the stock market will recover fully from its drop. You can bet that small-cap stocks will top the leaderboards when that happens.

How to take advantage of opportunities in small-cap stocks: