The by-election took place during the Second World War during unusual political conditions. No general election had been held since 1935, at which James Walker narrowly gained the seat for Labour from the Unionist Party.
The by-election was won by McIntyre, who became the first SNP Member of Parliament. However, Anderson regained the seat from McIntyre at the 1945 general election a few months later.