The invention relates to pyrrolidinyl, piperidinyl, and hexahydroazepinyl compounds of Formula I: and pharmaceutically acceptable salts, prodrugs, or solvates thereof, wherein R1, R2, Z and m are defined as set forth in the specification. The invention is also directed to the use compounds of Formula I to treat a disorder responsive to the blockade of calcium channels, and particularly N-type calcium channels. Compounds of the present invention are especially useful for treating pain.