A demonic djinn attempts to grant its owner three wishes, which will allow him to summon his brethren to earth.
The narrator, Angus Scrimm, in his only words in the film, introduces the audience to the creatures called "djinn" with the following statement:
Once, in a time before time, God breathed life into the universe. And the light gave birth to Angels. And the earth gave birth to man. And the fire gave birth to the djinn, creatures condemned to dwell in the void between the worlds. One who wakes a djinn shall be given three wishes. Upon the granting of the third, the unholy legions of the djinn shall be freed upon the earth. Fear one thing only in all that is... fear the djinn.
The next scene is set in Persia during the year 1127 with the djinn asking a Persian emperor to make his second wish. The emperor asks the djinn to show him wonders. The djinn uses his powers to torture and mutilate people in the palace. Before the emperor can make his third wish, Zoroaster (Ari Barak), a sorcerer, interrupts and states that upon the third wish granted to the one who woke the djinn, a gateway will open between the worlds, and the evil race of djinn can live on Earth. The sorcerer then reveals a fire opal. The djinn is sucked into the jewel, where he remains captured.
In present day America, Raymond Beaumont (Robert Englund) is supervising workers as they lower a box containing an antique statue of Ahura Mazda onto a ship's deck. The worker who is lowering the crate is drinking on the job and accidentally drops it from his crane, killing Beaumont's assistant (Ted Raimi) and destroying the statue. It breaks open and a dockworker finds the fire opal inside, which he steals and pawns. The jewel ends up at Regal Auctioneers, where boss Nick Merritt (Chris Lemmon) gives it to appraiser Alexandra Amberson (Tammy Lauren) to examine. Her examinations of the jewel wake the djinn.
Thinking she saw something inside the jewel, Alexandra takes it to her labworker, best friend and potential love interest Josh Aickman (Tony Crane) to analyze. Later, as he is collecting data, light reflections cause the gem to explode and the djinn is released. The lab is destroyed and Josh is killed, upon his wish for relief from his physical pain.
Alex, thinking the gem has something to do with the explosion and subsequent death of Josh, tracks down Beaumont, to whom the statue belonged. Beaumont tells Alex to visit a folklore professor named Wendy Derleth (Jenny O'Hara) to find out more about Ahura Mazda and the gem. He also invites Alex and her sister Shannon (Wendy Benson) to a party he is hosting. The folklore professor tells Alex about the jewel, the djinn and its evil history. Later, Alex learns that the djinn needs to power the gem with the soul of humans and then grant her three wishes before he can unleash the djinn on Earth. During this time, the djinn, who had been in demonic form, removes the face of a corpse in the morgue, taking on the dead man's form and the name Nathaniel Demerest. The djinn, now Nathaniel, goes about granting people wishes in return for their souls while he searches for Alex. He finally tracks down Alex's boss and grants him a greed-inflicted wish so that he can get Alex's address.
Alex is haunted by visions whenever the djinn grants a wish. She goes to Wendy Derleth's house to consult with her again, but Nathaniel has already killed her and taken her form. During their conversation, Alex realizes she is really talking to the djinn. He confronts her and asks her to make three wishes. He even gives her a "test" wish. She uses this wish and orders the djinn to kill itself. He complies by blowing his head off with a gun, yet the wound heals instantly; as the djinn is immortal, he cannot be killed. Alex then uses the first of the "official" three wishes: her first being to know her opponent, the djinn. Heteleports her to his terrifying world within the gem, thus demonstrating his true nature to her. Next, she wishes herself back to her apartment, alone. The Djinn had been threatening Alex's sister, so Alex sets about finding Shannon. She races to Beaumont's party and Nathaniel follows. While talking to Nathaniel at the party, Beaumont makes the mistake of wishing his party would be unforgettable, and Nathaniel begins wreaking havoc by causing the art pieces to kill the guests.
The djinn finally corners Alex and traps Shannon, trying to scare Alex into making the ultimate third wish. Alex wishes that the dockworker had not been drinking on the job two days ago, undoing the events that followed (and presumably reviving the djinn's victims back to life) and trapping the djinn in the opal. The dock scene is shown again and the now sober operator has no trouble lowering the crate containing Ahura Mazda. Alex goes to see Josh at the lab. He notices that Alex is strangely pleased with herself, but she will not say why.
Back on the statue of Ahura Mazda, which is now in Beaumont's private collection, the camera zooms inside the jewel and shows us the djinn on a throne, waiting to be released.Source: Wikipedia