Muslim believes in Barzakh, which is almost the same as purgatory. Barzakh (Arabic: برزخ) is an Arabic word meaning "obstacle", "hindrance", "separation",[1] or "barrier". read more
There is something akin to purgatory in Islam, it is called araf, the wall/no man's land between heaven and hell (muslims don't believe heaven is up and hell is down below in strictly that sense by the way, so this is not earth :p ) Araf is for people who have balanced sin and good deeds. read more
The idea of praying for the dead has been attested in Christianity from a very early date—the first or second century AD. That’s the source of the idea of Purgatory. When you think about it Purgatory is a very peculiar idea and it’s a characteristic of some but not all Christian denominations. read more