This article examines how party discipline and legislators’ individual policy goals induced by electoral rules influence the likelihood of defections from the party line in the Bundestag. Using a new indicator based on legislators’ explanations of their voting behaviour we find strong evidence that discipline, not policy cohesiveness alone, drives party unity. In particular, the allocation of offices by the party leadership significantly affects legislators’ propensity to defect from the position of their party. First, holding an executive office reduces legislators’ probability to defect by approximately 19 per cent. Second, parliamentary office also reduces legislators’ probability to defect, although the effect is smaller. District legislators are not generally more prone to defect, but their propensity to defect increases if electoral competition increases.