Purity: Purification by Transformation of Essence (Istihālah)
Practical Laws of Islam as per the teachings of Ayatullah Sistani
Ruling 189
If the essence of an impure object changes in such a way that it transforms into a pure object, it becomes pure. For example, if impure wood burns and transforms into ash, or a dog falls into a salt marsh and transforms into salt [the ash and the salt are pure]. However, if the essence of the object does not change – for example, impure wheat is turned into flour or made into bread – then it does not become pure.
-Ayatullah Sistani, Practical Laws of Islam, Purification (Taharah)