In Islamic eschatology, Barzakh (برزخ) is the intermediate state in which the soul of the deceased is transferred across the boundaries of the mortal realm into the spirit world and into a kind of "cold sleep" where the soul will rest until the Qiyamah (Judgement Day). The term appears in the Qur'an.
Barzakh is a sequence that happens after death, in which the soul will separate from the body, either harshly or painlessly depending on how righteous the person was before his death. Three events make up Barzakh:
The Barzakh or divine imagination is described by the classical Islamic Scholar Ibn Arabi:
Now since the Barzakh (of the creative divine Imagination) is something separating what is knowable and unknowable, existent and non-existent, intelligible and unintelligible, affirmed and negated, it has been given the name "Barzakh" as a technical term. It is intelligible in itself, yet it is nothing but the imagined-image (al-khayāl)! For when you perceive it -assuming you are in a rational state- you know that you have perceived something existent on which your gaze has fallen; indeed you most definitely know that there is absolutely something there. But what is this about which you affirm that it is an existent thing, while at the same time you are also denying that?! For this Imagination-Image (al-khayāl) is neither (entirely) existent nor nonexistent, neither (entirely) known nor unknowable, neither (entirely) affirmed nor denied. This is like a human being perceiving their (reflected) form in the mirror. The person definitely knows that they have perceived their (own) form in a certain respect, while they know just as absolutely that they have not perceived their form in another respect, because of the smallness of the image they see in the mirror, assuming the body of the mirror is small -since they know that their own form is a great deal larger than the one they saw... So what is that reflected form? And where is it actually located? And what is its (ontological) status? For it is both affirmed and denied, both existent and nonexistent, both known and unknown.
It is to something like this reality that each human being goes in their sleep and after their death (cf. 39:42). So that person sees (moral and spiritual) qualities and characteristics as self-subsistent forms that speak to him and with which he converses, as being (human) bodies without any doubt. And the person of spiritual unveiling (al-mukāshif) already sees (here), while they are awake, what the sleeper sees in their dream state or the dead person sees after they have died. Likewise they will see the forms of their actions being weighed in the otherworld (according to the Qur'anic symbolism of the "Scales") -despite their being (apparently nonsubstantial) qualities and characteristics (in this world)- and they will see death (according to the description in a famous hadith) as "a spotted ram being sacrificed", even though death is (really only) a relation (between two states of being)...
Therefore every human being in the Barzakh is "hostage to what they have acquired" (52:21; 74:38), imprisoned in the forms of their deeds, until they are raised up from those forms, on the Day of the Rising, in "the state of being of the other world" (29:20, etc.).
In Islam, there are five main stages of life: