1940 Middleton and Prestwich by-election

The 1940 Middleton and Prestwich by-election was held for the Middleton and Prestwich constituency on 22 May 1940, after the death of the sitting MP, Nairne Sandeman. It was held during World War II, and five of the largest political parties – Conservative, Labour, Liberal, National Labour and National Liberal agreed to an electoral pact not to contest any by-elections in seats held by any of the other parties.

The British Union of Fascists (BUF) had contested several recent by-elections, receiving very few votes. During the mid-1930s, the group had been able to organise sizeable demonstrations, but anti-fascist activity and the banning of political uniforms by the Public Order Act 1936 had hit the group hard. The BUF's main message was to call for immediate peace and a pact with the Axis powers; during the "phoney war" period this message had been received calmly, though it did not attract popular support to the party, by then already in decline.

The BUF selected Frederick Haslam, who was 43 years old and working as an engineering designer. Haslam had served in France and Palestine during World War I and had won the Military Medal at the Somme. However, by the time that the by-election campaign started, the British and German armies were fighting in Norway; on 9 May, the Germans invaded France through the Low Countries. This sudden escalation in the war gave many the impression that the BUF were, or could soon become, fifth columnists. Moreover, the seizure of power in Norway by Vidkun Quisling was a matter of concern; Quisling's career was superficially similar to that of BUF leader Oswald Mosley. When Mosley spoke in Middleton and Prestwich, he was attacked with missiles and some attempted to hit him. The government was also preparing to make the BUF illegal under wartime powers, and arrested several Fascist activists in the run-up to the election.

Nairne Stewart Sandeman had held the seat for the Conservative Party since the 1923 general election, and had won more than 60% of the vote in the 1935 general election against a Labour Party challenge. The party chose Ernest Gates to contest the by-election. With only Fascist opposition, the election was expected to be an easy win for Gates, who won resoundingly, with 98.7% of the votes cast and a 97.4% majority: an all-time record for any contested UK parliamentary by-election, and the largest majority in any parliamentary election since East Kerry in the 1885 general election.

Two months later on 10 July, the BUF was banned under Defence Regulation 18B. As a result, this was the final election contested by the party.