Electoral systems have been shown to influence strategic voting and the development of party systems but the focus has rarely been on the strategies that parties adopt to take advantage of the electoral system under which they compete. Electoral pacts form one such strategy. We present a theory about the formation of electoral pacts in majority run-off elections and pay special attention to the consequences of the presence of extremist parties. Analyzing the 2002 French legislative elections we find that the Socialists and the Greens were more likely to form an alliance (and to agree on a common candidate) in closely contested constituencies and where there was a potential of coordination failure on the right. Finally, we show that the agreement primarily benefited the larger party.