Small but mighty has never rung truer.

Small-cap stocks as tracked on the S&P Small Cap 600 outpaced the larger S&P 500 by 9.5% from February through May, according to data from S&P Dow Jones Indices. Following that hot streak, the small-cap index now outperforms large caps at a three-month premium level not seen since May 2002. Outperformance this big has only happened in a three-month period 12 times since September 1989, S&P said in a note on Monday, June 4.

Source: S& Dow Jones Indices
Source: S& Dow Jones Indices

For the first time since December 2016, all 11 small-cap sectors posted gains last month. It's a quick turnaround from February, during which all 11 sectors were negative for the month. "This is only the ninth time in history since January 1995 that the small-cap sectors went from all losing to all winning in three months or less, and the last time it happened was in October 2015," S&P found.

Healthcare, information technology and real estate were May's sector leaders, up 9.3%, 7.9% and 7.9%, respectively.

Source: S& Dow Jones Indices
Source: S& Dow Jones Indices

According to S&P's Head of U.S. Equities Jodie Gunzberg, strength in healthcare small caps has been driven by "healthy deal making, increased expectations for acquisition of smaller companies and stronger innovation." Healthcare measured outperformance of small caps over large caps of about 9%, analysts found.

Consumer staples had almost as much of a small-cap premium as healthcare in May, up about 8.8% compared to larger firms. Gunzberg added that the current economic landscape is more favorable for small-cap consumer staples than it is large-cap ones. "Smaller consumer staples companies historically do better from GDP growth, gaining on average 5.9% per 1% of growth, as compared to the large caps that rise just 4%," S&P wrote.

Source: S& Dow Jones Indices
Source: S& Dow Jones Indices

Additionally, rising rates are more of a boon to small-cap consumer staples than large cap. "For every 100 basis point increase, small-cap consumer staples rose 7.2% on average historically, whereas the same rate hike has only pushed large-cap consumer staples companies up 4% on average," S&P said.