Survival analysis techniques for sire-maternal grandsire (MGS) and animal models were used to test the genetic evaluation of longevity in a Slovenian Brown cattle population characterized by small herds. Three genetic models were compared: a sire-MGS model for bulls and an approximate animal model based on estimated breeding values (EBV) from the sire-MGS model for cows, an animal model, and an animal model based on the estimated variance components from the sire-MGS model. In addition, modeling the contemporary group effect was defined as either a herd or a herd-year (HY) effect. With various restrictions on the minimum HY group size (from 1 to 10 cows per HY), changes in estimates of variance components, and consequently also in EBV, were observed for the sire-MGS and animal models. Variance of contemporary group effects decreased when an HY effect was fitted instead of a herd effect. In the case of a sire-MGS model, estimates of additive genetic variance were mostly robust to changes in minimum HY group size or fitting herd or HY effect, whereas they increased in the animal model when HY instead of herd effects was fitted, possibly revealing some confounding between cow EBV and contemporary group effect. Estimated heritabilities from sire-MGS models were between 0.091 and 0.119 and were mainly influenced by the restriction on the HY group size. Estimated heritabilities from animal models were higher: between 0.125 and 0.160 when herd effect was fitted and between 0.171 and 0.210 when HY effect was fitted. Rank correlations between the animal model and the approximate animal model based on EBV from the sire-MGS model were high: 0.94 for cows and 0.93 for sires when a herd effect was fitted and 0.90 for cows and 0.93 for sires when an HY effect was fitted. Validation performed on the independent validation data set revealed that the correlation between sire EBV and daughter survival were slightly higher with the approximate animal model based on EBV from the sire-MGS model compared with the animal model. The correlations between the sire EBV and daughter survival were higher when the model included an HY effect instead of a herd effect. To avoid confounding and reduce computational requirements, it is suggested that the approximate animal model based on EBV from the sire-MGS model and HY as a contemporary group effect is an interesting compromise for practical applications of genetic evaluation of longevity in cattle populations.