By means of plane-wave density functional first-principles calculations within the generalized gradient approximation (GGA), we report the structural, elastic and mechanical properties of MB12 (M = Zr, Hf, Y, Lu) with UB12-type structure. The lattice constants, bulk modulus, elastic constants and related quantities such as Young's modulus, shear modulus, Zener anisotropy factor, Poisson's ratio and Cauchy pressure are calculated and compared with the available experimental and other theoretical data. A deeper understanding, the pressure variations of the lattice constants, bulk modulus, elastic constants and other mechanical properties are also analyzed in a wide pressure range (0-50 GPa) and their trends are discussed. Additionally, Mulliken population analysis is used to clarify the bonding nature of all compounds. Combining the bonding nature and the structural information, microhardnesses of all compounds are calculated theoretically and then the detailed comparisons between hardness and other mechanical properties such as bulk modulus and shear modulus are made. (C) 2012 Elsevier B.V. All rights reserved.