The seat in Greater Manchester is vacant after former Labour minister Andrew Gwynne stood down on Friday as an MP on health grounds.

Burnham, a former minister, is widely seen as a potential leadership challenger to Sir Keir, should he return to Westminster.

Asked if he would welcome Burnham back into the House of Commons, the prime minister said “that’s a matter for Andy” and that he was doing a “first-class job” as mayor of Greater Manchester.

The prime minister claimed that only Labour could beat Reform UK in Gorton and Denton.

“You can see from their [Reform’s] candidate what politics they’re going to bring to that constituency, the politics of division, of toxic division, of tearing people apart,” Sir Keir said.

“That’s not what that constituency is about, it’s not what Manchester is about, so this is a straight fight between Labour and Reform and there’s only one party that can stop the politics of Reform in the by-election and that’s the Labour Party.”

The academic-turned-political campaigner Matt Goodwin has been selected as Reform’s candidate in the forthcoming by-election.

The Workers Party of Britain has announced Shahbaz Sarwar – a councillor on Manchester City Council, representing Longsight ward – as its candidate for the Gorton and Denton by-election.

A 10-member panel of Labour’s ruling body, the NEC, blocked Burnham’s candidacy over the weekend, citing the “disproportionate” cost to the party of taking part in a contest to replace him as mayor.

Sir Keir was among eight NEC members voting to bar Burnham.

Burnham denied reports that he had been told beforehand by Downing Street that he would be prevented from standing.

“It is simply untrue to say that I was told that I would be blocked,” he told reporters. “I went through the whole weekend having conversations with people in No 10.”

The BBC has been told about 50 Labour MPs have signed a letter urging the NEC to “re-evaluate” its decision.

At the 2024 general election, Labour won Gorton and Denton with a 13,000 majority. Reform UK came second with 5,000 votes, narrowly beating the Green Party into third place.