Imran Ahmad Khan, a lawmaker from UK Prime Minister Boris Johnson‘s Conservative Party, has resigned after being convicted of sexually abusing a 15-year-old boy, triggering a by-election that will be a test of the embattled UK PM’s popularity, especially in the wake of the partygate scandal.

The 48-year-old lawmaker, a representative of the Wakefield area in northern England has consistently denied any involvement in the case, but was, on Monday, convicted of sexually abusing the boy in 2008.

Also read | Sorry not sorry: UK PM apologizes but refuses to resign over partygate fine

Immediately after his conviction, the Conservative party ousted the 48-year-old, despite Khan’s plans to appeal his conviction.

Subsequently, Khan announced his resignation, citing long delays in the legal process and the consequent lack of representation for his constituents.

“Even in the best case scenario, anticipated legal proceedings could last many more months,” the 48-year-old lawmaker said, adding that he would “focus entirely” on clearing his name.

Also read | Boris Johnson, Rishi Sunak to be fined over COVID guideline breaking parties

“Consequently I am resigning as MP for Wakefield and withdrawing from political life,” Khan said, concluding his statement.

Khan’s resignation will trigger a by-election in the West Yorkshire constituency of Wakefield, which had, up until 2019, been one of the traditional Labour strongholds in the so-called Red Wall of the UK.

Also read | Zelensky welcomes armoured vehicles from UK, urges West to follow suit

However, Johnson’s Conservatives secured an unlikely victory in the 2019 general elections, with Khan winning the seat by a margin of 3,358 votes over runner-up Mary Creagh of the Labour party.

With a by-election imminent now, the battle for the Wakefield seat will become a test of Johnson’s popularity, which has taken a significant hit since the revelations about his lockdown parties at Downing Street during the COVID-19 pandemic became public knowledge.