Tough choice.
To get the bottle (with the efreeti) you can pickpocket the djinni before you return the head. (take a potion of master thievery first and SAVE).
I would think either would work, as long as the townsfolk and governor are happy with the outcome.
It is entirely up to you. Whatever the choice, it won't effect the rest of the game.