When an imprisonment spell is cast and the victim is touched, the recipient is entombed in a state of suspended animation (see the 9th-level wizard spell temporal stasis) in a small sphere far beneath the surface of the earth. The victim remains there unless a reverse of the spell, with the creature's name and background, is cast. Magical search by a crystal ball, a locate object spell, or similar means will not reveal the fact that a creature is imprisoned. The imprisonment spell functions only if the subject creature's name and background are known.
The reverse spell, freedom, cast upon the spot at which a creature was entombed and sunk into the earth, causes it to reappear at that spot. If the caster does not perfectly intone the name and background of the creature to be freed, there is a 10% chance that 1 to 100 creatures will be freed from imprisonment at the same time.
Note: The exact details of any creatures freed are up to the DM. A random method of determining this is to roll percentile dice twice (once for imprisoned creature density and once for a base number of creatures at maximum density). The rolls are multiplied and rounded to the nearest whole number. Each released creature has a 10% chance to be in the area of the spellcaster. If monsters are being generated randomly, roll 1d20 for level, with rolls of 9+ considered 9, and the exact monsters determined by the random encounter tables.
For example, if the initial rolls were 22 and 60, the number of monsters released is .22 x .60 = .1320 = 13 monsters. Since only 10% of these will be in the immediate vicinity of the caster, the wizard may encounter only one or two of them.