Polls have closed in the by-elections being held in Wakefield and Tiverton and Honiton.
Both seats were held by the Conservatives before their previous MPs resigned in disgrace, triggering the by-elections.
Results are expected to be announced overnight.
The polls are regarded as a key test for Prime Minister Boris Johnson‘s leadership after 148 of his own MPs voted against him in a confidence vote.
Asked whether he would consider his position if he lost both by-elections, the prime minister said: “I’m going to be watching the results with interest.”
While “always full of optimism and buoyancy”, the PM cautioned: “I think most seasoned political observers such as yourself know that by-elections in midterm are never necessarily easy for any government.”
In Wakefield, West Yorkshire, ex-Conservative MP Imran Ahmad Khan stood down after being found guilty of sexually assaulting a 15-year-old boy and being jailed for 18 months.
Source of polio virus could be narrowed down ‘to individual households or streets’, minister says
Elections live: Counting begins as PM faces nervy night with Labour and Lib Dems aiming for by-election victories
Boris Johnson may be abroad but he can’t escape enormity of first ballot box test since confidence vote
Once one of the so-called Red Wall seats, it was won by the Tories in the 2019 general election, though Labour is now hoping to take it back.
In Tiverton and Honiton, Devon, Neil Parish resigned after admitting he had watched pornography twice on his phone in the House of Commons.
The Liberal Democrats have their sights set on the constituency and would need to overturn a Conservative majority of 24,239.
If the Conservatives lose both by-elections, it would be only the seventh time a government has suffered a double defeat since the Second World War.