After New Democracy resoundingly lost the 2009 legislative election, Kostas Karamanlis resigned as head of the party, prompting a leadership race, and Samaras ran for the post. Early polls showed he was running neck and neck with the perceived initial favorite Dora Bakoyanni, the former Foreign Minister and former Athens mayor. Shortly thereafter, another leadership candidate, former Minister Dimitris Avramopoulos announced he was resigning his candidacy and would support Samaras instead. In a break with previous practice, an extraordinary party congress resolved that the new leader would be elected by party members in a countrywide ballot. Samaras' candidacy soared in opinion polls and finished the race as a favorite.