Two by-elections to Britain's parliament to be held in October

British Prime Minister Rishi Sunak walks outside 10 Downing Street in London

LONDON (Reuters) - Two British parliamentary by-elections will be held in October in a test of how Prime Minister Rishi Sunak's Conservatives are faring in the party's heartlands and whether the opposition Labour Party is recovering support in Scotland.

The votes will determine replacements for two outgoing lawmakers and are seen as an important electoral test for both major parties ahead of a national election expected next year, with Labour currently ahead in the polls.

On Oct. 19, Sunak's Conservatives will bid to keep hold of the Mid-Bedfordshire seat in south-east England vacated by Nadine Dorries, who criticised Sunak's leadership when she formally resigned last month.

Dorries, an ally of former PM Boris Johnson, had announced in June she would quit but delayed her resignation. Votes to replace Johnson, who also stood down as a lawmaker, and two other Conservative lawmakers have already taken place.

In those July votes, Sunak's Conservatives lost two strategically important parliamentary seats but unexpectedly retained Johnson's old constituency in a setback for Labour.

The other by-election to be held in October will be to replace a Scottish National Party (SNP) lawmaker who was expelled from the party and removed by constituents for breaking COVID lockdown rules.

Margaret Ferrier had represented Rutherglen and Hamilton West on the outskirts of Glasgow, and the contest to replace her is likely to be held on Oct. 5. The final decision on the date is pending approval from the local council.

The by-election will show whether Labour is able to win again in Scotland, where it needs to recapture some of its former dominance if it is to return to government.

The dates for the two votes to replace outgoing lawmakers were announced on Monday, the first day back after a parliamentary summer recess.

(Reporting by Alistair Smout; editing by William James and Christina Fincher)