PotashCorp (POT) recently delivered a dismal third quarter, even topping it up with a tepid outlook for the full year. Meanwhile, Agrium (NYSE: AGU) and Mosaic have warned investors of lower sales and profits for their respective third quarters, and both will likely go PotashCorp's way in reducing their full-year guidance estimates when they report numbers early November.

If you notice, each of these companies gets the bulk of its revenue from a different nutrient. If nitrogen is the biggest contributor to Agrium's wholesale division sales, Mosaic is primarily a phosphate player, and PotashCorp relies heavily on its namesake nutrient. With all three companies sounding the warning bell, it is clear that the entire fertilizer industry has hit a roadblock.

Such situations can easily spook investors, and even lead to hasty investment decisions. So it becomes imperative to know what's going inside each nutrient market, whether recent events have changed the long-term dynamics of the industry, and what it means for your stocks going forward. I'll try to make things easier for you by answering some of those questions, beginning with the most important nutrient, nitrogen.

Who is at the top?
Before I delve deeper, take a look at this graph to get an overview of the world's fertilizer consumption and projections into 2020.

Source: PotashCorp 

As you see, nitrogen is the most widely consumed nutrient in the world. Hence, nitrogenous products such as urea and ammonia have enjoyed consistent demand and relatively firm prices over the years. Things however, have looked different so far this year.

The looming threat
Average ammonia and urea prices have declined more than 20% each since January this year. Wet weather delayed spring application and weakened demand during the first half. Then in July, China slashed taxes on urea exports to encourage local producers to export their produce during the domestic off-season period. As a result, the U.S. market was flooded with cheap Chinese urea, resulting in over supply that put tremendous pressure on urea prices.

With China's low-tax export window open until October 31, it is easy to guess why Agrium and PotashCorp expect a soft third quarter. PotashCorp, which is the world's third -largest nitrogen company by capacity, even expects a "significant uptick" in Chinese urea exports for the rest of the year. Interestingly, CF Industries (CF 0.90%) – North America's largest nitrogen producer – hasn't given any updates yet for its third quarter or the full year. But some months back, CF Industries had given investors a hint of weak days ahead when it projected "modestly lower " demand for urea from North American market in 2014". Investors can expect an update when CF Industries reports its third quarter numbers next month.

But investors shouldn't bother much about this year, or even the next. Instead, the prospects over the long run matter. If industry forecasts are anything to go by, difficult days may have just begun for nitrogen producers.

Low demand + low price + high cost = uncertain future
The International Fertilizer Industry Association foresees the imbalance in the demand and supply of nitrogen to worsen in the coming years. According to the IFA, while nitrogen capacity in the world is projected to increase 13% between 2013 and 2017, demand growth will likely stop short of 9% clip. That's a clear case of excess supply which could prevent nitrogen prices from moving up.

Worse yet, prices of a key input -- natural gas -- are expected to rise in the near future. The World Bank projects the Henry Hub spot natural gas price to hover around $4.9 per million British thermal units, or MMBtu in 2017 and cross the $6 mark by 2022. That's a significant increase, and could hit the margins of nitrogen producers substantially. Here's an idea of how big that blow could be for some of the leading fertilizer companies.

Where gas hits most
Natural gas makes up anything between 70%-85% of PotashCorp's cash cost to produce ammonia. Since nitrogen makes up more than a quarter of PotashCorp's revenue, one can guess the impact of high gas prices on the company's overall margins. Agrium gives investors a clearer picture -- every change of $0.50 per MMBtu in gas price can  hurt its operating earnings by $44 million and net income by $32 million.

It's no secret that nitrogen-specialist CF Industries will take the biggest hit if natural gas prices shoot up. Every $1 per MMBtu rise in nat-gas price increases CF's per ton production cost of ammonia and urea by $33 and $22, respectively. Extrapolating the 7,067,000 tons of ammonia and 2,560,000 tons of urea that CF Industries produced last year, the company's annual cost of producing the two fertilizers could increase by $233 million and $56 million, respectively for every $1 per MMBtu increase in gas price. Ouch!

The Foolish bottom line
While natural gas price is a major concern, increased production and exports of nitrogenous fertilizers out of China pose an even bigger threat to the nitrogen industry going forward. That adds a good deal of uncertainty to the growth prospects of the companies discussed above, particularly CF Industries and its subsidiary Terra Nitrogen. Long-term investors should keep this in mind, and prepare themselves for volatile times in the years to come.