The hardness of single-crystal GaN and AlN of 0.5-mm-thickness was measured by the Vickers indentation method in the temperature range 20 - 1400°C. The hardness of GaN and AlN is 10.2 and 17.7 GPa, respectively, at room temperature. The nano-indentation hardness of single-crystal AlN was measured at room temperature as 18 GPa, harder than GaN and InN. Up to about 1100°C, GaN and AlN maintain its hardness similar to that of SiC and thus, a high mechanical stability for GaN and AlN at elevated temperatures is deduced. Yield strength of nitrides is discussed.