For the second day in a row, shares of fertilizer miner Intrepid Potash (IPI -0.36%) are scoring strong gains on Thursday -- up 19.7% through noon ET on top of a 4.3% gain yesterday.

And here's the crazy thing: Intrepid Potash is not going up because of potash. It's going up because of lithium.

Is this potash miner sitting on a gold mine?

This stock's rally began on Tuesday with an announcement by Intrepid Potash that it will partner with privately owned Pickering Energy Partners to exploit the value of the lithium in Intrepid's mine in Wendover, Utah.

"We have long known [lithium] to be present in the brine at our Wendover mine," CEO Bob Jornayvaz said. And apparently, we're not talking about just a little lithium, either. Pickering's chief investment officer, Dan Pickering, characterizes the lithium opportunity as being "as compelling as [Intrepid's] existing potash operation."

Depending on how precise he intended that statement to be, this could mean that the lithium business might add as much as another $170 million to Intrepid's annual revenue stream, and perhaps double the company's profits.

Is Intrepid Potash a buy?

(Extremely) hypothetically, profits might even benefit by more than just a doubling of sales might imply. This is because Intrepid Potash already has most of the infrastructure built for lithium producing.

As the company explains, the process by which it produces potash involves processing brine to concentrate potassium and then deposit potash and salt (including lithium salts) for later processing. Thus, the same evaporation process that already produces potash should also easily produce lithium, which then just needs to be separated out, processed, and sold.

Basically then, by selling its lithium instead of just throwing it away, Intrepid Potash will be able to more fully utilize its existing infrastructure, spreading costs out over more revenue -- resulting in better profit margins.

The company might not look like a great investment at 42 times earnings today. But if more revenue and higher margins mean more profits in the future, that price-to-earnings ratio could be coming down in the future -- making Intrepid Potash stock look like a much better buy.