The goal of a properly lived life, according to Sufis, is to behold the Truth, the ultimate Reality, which liberates humans from ignorance. Attaining knowledge of Truth is not something reserved only for the afterlife, but is a goal Sufis seek to accomplish while they are alive. In this sense, salvation, if by salvation we mean reconciling one's soul with God, is something Sufis seek through the acquisition of knowledge/ma'rifa. This may be considered akin to the term gnosis, in the Judeo-Christian tradition, which also refers to a specialized knowledge of the divine.
Modern scholar Seyyed Hossein Nasr discusses attaining knowledge in the context of a Quranic verse in which Moses tells his household that he has "seen a fire" and will "bring a flaming brand that you may warm yourselves" (Quran 27:6) (Seyyed Hossein Nasr, The Garden of Truth, 30-1). If the fire is certainty about the Reality of God and the Universe, or, put another way, knowledge of the Truth, Nasr then likens the attainment of knowledge, or certainty, to the climbing of a ladder at the top of which one is consumed by the fire. He cites a poem by Rumi to this effect:
The result of my life is contained in but three words:
I was unripe, I ripened, I was consumed.
According to Ibn Arabi, living a life that was pleasing to God and attaining salvation depended on serving the needy, having a peaceful heart, feeling good will toward other Muslims, and thinking well of others. Attaining a peaceful heart assures the Sufi that even in an inchoate and confusing world, the peace of having become sublimated into God's Ultimate Reality is infinite. In the afterlife, all the limitations and constraints of the current world will be open to limitless change and possibility. According to Ibn Arabi, the best way to prepare for a good afterlife is to recover the relationship with God by discovering His True nature. According to William Chittick,
The world after death is the awakening to the endless self-disclosures of the Real. The stages of the return to God in this life map out in broad strokes the infinite imaginal realm where disclosures will be seen for what they are. Every stage on the path to God prefigures one of the homesteads of the next world. Human nature finds the imperative to follow the path in the hunger to know the divine names and find their substance within the self, a hunger that is commonly known as love. ("The Disclosure of the Intervening Image: Ibn 'Arabî on Death," Discourse, 24.1, Winter 2002, page 57)
Ibn Arabi wrote that "among us are those who know God in this world, and among us are those who do not know Him until they die, loving some specific thing. Then, when the covering is lifted, they will come to understand that they had loved only God, but they had been veiled by the name of the created thing." According to these principles, of covering and uncovering, veiling and unveiling, to spend one's life seeking to discern the Real beyond the veil of the universe is to prepare for a return to God, when all coverings, or trappings of the present world, will be lifted. For Sufis, the traditional Islamic view of a Day of Judgment is augmented by the additional motif of the veil's being lifted to reveal the Realities of the universe.