The stock market has delivered some powerful returns for investors over the past couple of years. But diversified investors have gotten even better performance from an unexpected corner of their portfolios: real estate investment trusts.

At first glance, now might seem like a terrible time for REITs. With the housing market steadfastly refusing to rebound, investors in related stocks like homebuilders have gotten burned several times hoping for turnarounds that have thus far failed to materialize. But what many people don't understand is that REITs cover a much broader swath of the real estate market than just residential single-family housing. In many segments of that broader market, conditions are much more favorable and have produced strong profits for REITs.

Beating the market
In fact, when you look at the overall REIT sector, its returns have outpaced those of the S&P 500. During the first quarter, the FTSE NAREIT All Equity REIT Index rose almost 7.5%, versus a 5.9% gain for the S&P 500. And for the past year, REITs have gained 25%, compared to just a 16% rise in the S&P. All told, real estate investment trusts have roughly tripled from their March 2009 lows, well outperforming the doubling in the S&P 500 over the same timeframe.

But various parts of the REIT market have done much better than others. Here are some of the top-performing subsectors among REITs:

So far this year, timber REITs have performed the best of all REIT subsectors, with year-to-date total returns of more than 24%. The largest landowner in the country, Plum Creek Timber (NYSE: PCL), gained almost 18%, while Rayonier (NYSE: RYN) jumped 21% and Weyerhaeuser (NYSE: WY) posted a 30% rise.

Timber REITs have investing appeal for a number of reasons. For those seeking diversification, timber prices don't have much correlation to other financial markets. Moreover, although prices have been relatively weak, some expect them to recover in the coming years, potentially giving timber REITs a boost. In the meantime, like most REITs, they pay healthy dividends while you wait for a recovery.

Industrial and storage REITs
The other subsectors providing double-digit returns in the first quarter were industrial and storage REITs. Public Storage (NYSE: PSA) gained 10% for the quarter, while ProLogis (NYSE: PLD) rose about 12%.

Storage REITs provide some ballast against changing economic conditions, as average occupancy rates have stayed high even during the recession thanks to customers maintaining storage facilities. In contrast, industrial REITs thrive in an improving economy, and investors are apparently betting on continued economic strength in bidding up ProLogis shares.

Where are the mortgage REITs?
Notably absent from the rally were mortgage REITs, which showed total returns of less than 2% for the quarter. With Chimera (NYSE: CIM) posting a negative return in the first three months of the year and Annaly Capital (NYSE: NLY) not faring much better, the updraft that pushed mortgage REIT prices strongly higher over the past two years took a pause to open 2011.

What happens next for mortgage REITs depends largely on the Federal Reserve. Once short-term interest rates start to rise, mortgage REITs will see their sources of short-term financing get more expensive, pressuring margins and potentially leading to dividend cuts. That won't necessarily kill the companies entirely -- but it may make mortgage REITs less attractive to marginal investors who've only recently gotten in on their high-yielding action.

Follow the REIT lead
If you're new to REIT investing, you may have a skewed notion of exactly how broad a sector REITs cover. With many different REITs covering a widely disparate swath of the real estate market, you can tailor your REIT investments to whichever types of real estate you think will do best given your view of the economy's future. What recent results show is that just as we've seen in the overall stock markets, REITs rotate among their subsectors, and being in the right place at the right time can be extremely lucrative for smart investors.

Don't ignore strong-performing REITs. Add them to your watchlist and keep informed.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.