squire won the new seat in the 2005 general election and held it until her death on 5 january 2006. the subsequent by-election was held on 9 february 2006, which liberal democrat willie rennie won in a shock defeat for labour. the liberal democrats also gained the dunfermline west scottish parliamentary constituency from labour in the 2007 holyrood parliament elections.