Temperament can be defined as the fearfulness and reactivity of an animal in response to humans and strange, novel or threatening environments. The productive performance of an animal is affected by its temperament, and selection of calm animals might improve their adaptation to the farming environment and handling, as well as improve productivity. The temperament was measured in lambs of two breeds of sheep in Uruguay. The effects of dam’s age, type of birth, age of the lamb and contemporary group (CG; lambs belonging to the same year, flock, sex and rearing group) on the temperament of the lambs and the heritability of temperament were estimated with a Bayesian analysis using Gibbs sampling. Overall, 4962 Corriedale lambs and 2952 Merino lambs from 13 farms were tested. Temperament was measured using the isolation box test, isolating a lamb inside the box for 30 s, and recording the vibrations produced by its movements. The average temperament score (±s.e.m.) of the Corriedale lambs was 24.7 (±0.23) and that of the Merino was 36.8 (±0.45). Temperament was not associated with dam’s age, type of birth or lamb’s age. There were no relevant differences in the agitation score between lambs born in 2010 and 2011. The mean of the distribution of possible values of heritability (±s.d.) was 0.18 (±0.05) for the Corriedale and 0.31 (±0.06) for the Merino. The likelihood of heritability values to be greater than 0.15 exceeded 70% in the Corriedale and 90% in the Merino. The temperament of Merino and Corriedale sheep in Uruguay is moderately heritable. It is not related to dam’s age, type of birth or age of the lambs; however, it is affected by some aspect of the CG.