In parametric efficiency studies, two alternative approaches exist to provide an estimate of the long‐run efficiency of firms: the dynamic stochastic frontier model and the generalised true random‐effects model. We extend the former in order to allow for heterogeneity in the long‐run technical efficiency of firms. This model is based on potential differences in firm‐specific characteristics and in firms’ inefficiency persistence. The model is applied to an unbalanced micro‐panel of German dairy farms over the period 1999 to 2009. Estimation of long‐run technical efficiency and inefficiency persistence is based on an output distance function representation of the production technology and estimated in a Bayesian framework. The results suggest that heterogeneity in long‐run technical efficiency of farms is mostly attributed to discrepancies in farm‐specific factors rather than differences in farms’ inefficiency persistence. Farm size is positively related to long‐run technical efficiency while subsidies exert a negative effect on the long‐run technical efficiency of farms. Inefficiency persistence is found to be very high, but heterogeneity in this persistence is low.