the dunfermline and west fife by-election was held in early 2006, due to the death of the sitting mp, rachel squire. willie rennie of the liberal democrats was the surprise winner, by some 1,800 votes, in what was seen as a safe labour seat. however, he lost the seat to labour's thomas docherty at the 2010 general election. chapman then won the seat in the snp's scottish landslide in the 2015 general election.