Major natural sources of potassium nitrate were the deposits crystallizing from cave walls and the accumulations of bat guano in caves. Extraction is accomplished by immersing the guano in water for a day, filtering, and harvesting the crystals in the filtered water.
For real?!
TIL! Thanks for explaining.
Yup: https://en.wikipedia.org/wiki/Guano
Though its main use was as fertilizer, Guano was also sought for the production of gunpowder.
https://en.wikipedia.org/wiki/Potassium_nitrate#From_caves