Swinney served in the British House of Commons as Member of Parliament for Tayside North from 1997 to 2001. After Alex Salmond resigned the leadership in 2000, Swinney was elected Leader of the Scottish National Party in the ensuring leadership election. Swinney's leadership proved ineffectual, with a loss of one MP in 2001 and a further reduction to 27 MSPs in 2003 despite the Officegate scandal unseating previous First Minister Henry McLeish. However, the only parties to gain seats in that election where the Scottish Greens and the Scottish Socialist Party (SSP) which like the SNP support independence. After an unsuccessful coup attempt in 2003, Swinney stepped down following disappointing results in the 2004 European Parliament election with Salmond elected in the subsequent 2004 leadership contest.