The degree of flexibility of the electoral list in PR systems crucially shapes political candidates’ incentives to exert costly effort during the campaign. For example, depending on their position in the list, some candidates in inflexible (e.g., closed) lists may have no incentives to exert effort to improve the party’s overall performance. A more flexible list structure may instead be more effective in incentivizing these candidates to contribute to the party’s public good. We exploit a unique feature of the Norwegian electoral system, where parties can, via allocating preferred ranks, affect the degree of list flexibility. We study how the party leader optimally designs the list flexibility in order to solve the moral hazard problem with the individual candidates while being concerned with both gaining seats in elections and maintaining control of the type of the elected candidates. We propose a theory to formally identify the number and type of candidates that the party leader chooses to assign to a safe position in the list, as a function of the features of the electoral environment as well as the party’s motives. We empirically test our predictions using large and rich data on Norwegian local elections.