Intra-party competition is widespread and affects political parties’ strength. This paper presents a model of elections in which intra-party factions can devote resources to campaigning for the party or undermining competing factions to obtain more power. The model shows that inter- and intra-party competition are substitutes: Internal competition increases when the electoral stakes are low — e.g., in consensus democracies granting power to the losing party — because the incentives to focus on the fight for internal power increase. Similarly, an increase in party polarization incentivizes factions to campaign to avoid a more costly electoral loss. Factions in the moderate party campaign more than those in the extreme party; conversely, when factions in the same party are ideologically divided, extreme factions campaign more. Finally, the model studies how internal rules affect intra-party competition, showing how parties design internal contests among factions to maximize campaigning.