Rishi Sunak will face a test of his leadership in two by-elections on July 20 caused by Boris Johnson and his ally Selby MP Nigel Adams.

The former prime minister quit his Uxbridge and South Ruislip seat to avoid the judgment of the Privileges Committee.

The cross-party panel subsequently recommended he should have faced a 90-day suspension for deliberately misleading MPs over partygate and his conduct in attacking the committee.

Another contest will be held in Selby and Ainsty, triggered by Nigel Adams who quit as a Conservative MP after being denied a peerage in Mr Johnson’s resignation honours list.

Tories choose their candidate to replace Nigel Adams MP

Mr Johnson held his west London seat with a majority of 7,210 in 2019 but Labour hopes to take advantage of the Tory turmoil to win.

Labour has always come second in this seat at general elections and polled 38% of the vote in 2019, 15 percentage points behind Mr Johnson.

In Mr Adams’ seat, he took 60% of the vote and won a majority of 20,137 in 2019.

Labour came second with 25% of the vote, 35 percentage points behind the Tories.

The Selby & Ainsty constutuency includes Selby, Tadcaster, Sherburn-in-Elmet and villages west of York, including Tockwith and Rufforth.

Nigel Adams pledges to keep Selby and Ainsty Tory in by-election

The Conservative candidate in the upcoming by-election is expected to be Michael Naughton, who was recvently selected for the new Selby seat, which comes into effect for the 2024 election. However, this has not yet been confirmed.

The Green Party, however, has announced its candidate as Arnold Warneken, a councillor for the new North Yorkshire council, from Ouseburn in the north of the constituency.

The Prime Minister also faces the prospect of another by-election, after Nadine Dorries said she would quit her Mid Bedfordshire seat with immediate effect.

Selby MP Nigel Adams becomes third Tory MP to quit in 24 hours

However, that contest has been delayed after she vowed to stay on while she investigates how she was denied her expected peerage in Mr Johnson’s resignation honours.

But in a sign the Tories are gearing up to defend the seat – where Ms Dorries notched up a huge majority of 24,664 at the 2019 general election, some 60% of the vote – Cabinet minister Oliver Dowden was out on the campaign trail on Thursday.

The Liberal Democrats hope to spring an upset there, despite the huge swing needed.