BNP lose by-election after church campaign