
I suppose the best way to describe jinn in general is that they're basically like demons, in that they're magical beings that often harass or possess human beings, but can also be summoned to provide services to magicians. They had been part of Arabian mythology for some time prior to the advent of Islam, but Mohammed worked them into the Qur'an. His explanation was that jinn were basically the third humanoid race, made out of fire as angels are from light and humans from clay. Their leader, Iblis, is referred to as both a jinni AND an angel, which I can only conclude means he was made from firelight. {g} Jinn in Islamic belief can be either good or evil, with some accepting Islam and others not. One of the crazier (at least to a modern audience) accounts of jinn in the hadith claims that they can live in privies, and prayers are necessary to...well, more or less stop them climbing into your body through your rear end.
One man who was said to have control over the jinn was none other than King Solomon, who was a sorcerer in Islamic legend. You'd think that would be an odd thing to leave out of the Bible, but maybe the Arabs thought it went without saying. After all, magic is knowledge that most people don't have, and the terms "wizard" and "witch" are derived from the word for "wise," right? So I guess it was only logical to the legend-writers that the reputed wisest man in history would also be a skilled wizard. He had the jinn construct buildings and fight in battles for him, after which some versions of the legend say that he imprisoned them in brass bottles. Frankly, I would have expected better treatment from the fabled king who...um, suggested that a baby be cut in half...okay, maybe that's EXACTLY the kind of treatment I should have expected. I think the idea of jinn granting wishes came from the idea that they would reward people who freed them from their prisons. The story of Aladdin, as I'm sure you know, includes jinn living in (or at least able to be summoned by) a lamp and a ring.