Parties value unity, yet members of parliament have incentives to deviate from the party line. This article examines how members of the European Parliament (EP) respond to competing demands from national parties and European party groups. We examine ideological shifts within a single parliamentary term to assess how election proximity affects party group cohesion. Our formal model of legislative behavior suggests that when EP elections are proximate, national party delegations shift toward national party positions, thus weakening EP party group cohesion. Our Bayesian item-response analysis of roll calls in the 5th EP supports our theoretical predictions.