Fertilizer producer CF Industries (CF 1.07%) is defying the calamity affecting the broader fertilizer industry. While its industry peers look shaky due to an extremely difficult operating environment, CF Industries appears to be a pillar of stability. Even while under severe pricing pressure last year, the company maintained strong margins, bought back stock, and raised its dividend. And, perhaps more importantly, it sees a better year ahead thanks to improving market conditions.

Broad industry woes mask CF Industries' business strength
Most fertilizer watchers who view industry conditions globally were likely caught up with the breakup of one of the world's largest potash partnerships last year. This unleashed a wave of panic on the global fertilizer industry. Soon after, potash prices plummeted, which unsurprisingly afflicted a great deal of damage to PotashCorp. of Saskatchewan (POT) and Mosaic (MOS 1.64%).

Meanwhile, CF Industries held up pretty well last year. On the surface, CF Industries' results don't look very strong at all. Net sales and earnings per share each fell by 10% and 13%, respectively. But seen in a different light, these results convey a great deal of resilience in what proved to be a turbulent year for most fertilizer producers.

Potash Corp. and Mosaic are both suffering from the carnage swirling through the potash market. Potash Corp. saw its full-year 2013 earnings fall by 14%, which the company attributes specifically to falling potash prices. Likewise, Mosaic's 2013 profits collapsed by 42% year over year. Management stated that lower sales and earnings for the year were due primarily to lower realized prices for both phosphate and potash.

Outlook for the potash market doesn't provide confidence
Another reason to be optimistic about CF Industries is that it sees recovery ahead. Importantly, CF Industries management sees urea prices recovering in 2014, which is critical to nitrogen fertilizer. As urea prices fell last year, Eastern European manufacturers shut down and gas curtailments in Libya and Egypt severely tightened the market. Going forward, CF Industries sees these restrictions easing and management hopes 2014 will see a return to more normal business conditions.

By comparison, Mosaic sees near-term difficulty in its phosphate segment, where sales are expected to drop 9% in the first quarter. Likewise, Potash Corp. doesn't believe its own business will recover at all in 2014. Management expects earnings per share to fall another 21% in the current year.

CF Industries' product focus pays off
As opposed to Potash Corp. and Mosaic, which are highly sensitive to the collapse in potash prices over the past year, CF Industries' unique product mix saved it from a lot of the pain. That's because CF industries operates in a different corner of the fertilizer market than Potash and Mosaic and isn't seeing business deteriorate nearly to the extent of its two peers.

CF Industries is heavily oriented toward nitrogen fertilizer, an initiative the company first began in 2005. This has clearly paid off since CF Industries has doubled its nitrogen product sales since 2005 to approximately 13 million tons. CF Industries also committed to low-cost feedstock, which has expanded margins. The company produced an 11% gross margin in 2005, when it began its transformation toward nitrogen products. In 2013, CF Industries' gross margin clocked in at 46%.

Going forward, CF Industries will only expand its nitrogen business, which makes a lot of sense considering the relative success of nitrogen versus phosphate. CF Industries will continue to optimize its structure by selling its phosphate business to Mosaic for $1.4 billion.

The Foolish bottom line
There were startling headlines made last year when one of the world's biggest fertilizer partnerships broke up, which sent prices spiraling lower. However, an important separation needs to be made between potash and phosphate fertilizer versus nitrogen. Nitrogen fertilizer is holding up relatively well, which is paying dividends for CF Industries. That's because CF Industries focuses primarily on nitrogen.

While Potash Corp. and Mosaic continue to see deteriorating conditions unfolding over the next several months, CF Industries is looking forward to better days in 2014. And, since nitrogen is expected to recover fairly well this year, it's on a much smoother path to recovery than its potash and phosphate-focused peers.

Agriculture stocks have great long-term trends at their back, much like these 3