Labour could hold an open primary to find a new candidate for Edgbaston as Ed Miliband faces the prospect of a difficult and high-profile by-election.

The primary would be designed to find a local candidate with enough popular support to take on the Tories and win the marginal seat if sitting MP Gisela Stuart succeeds in her ambition to become city mayor.

Ms Stuart, the Labour MP for Edgbaston, would need to quit the Commons if she succeeds in becoming mayor of Birmingham, prompting a by-election.

The Labour leader has been lukewarm in response to Ms Stuart’s announcement that she will seek the Labour nomination to become the city’s mayor, and has already raised his concerns about a potential by-election with her.

But Ms Stuart’s allies are pushing the idea of an open primary to choose a new candidate as a way of helping the party win. Birmingham’s voters will be asked to choose whether they want to move to a mayoral system in a referendum next May.

If they vote “yes” then parties will begin the process of choosing candidates. The mayoral election is scheduled to be held in May 2013 but Local Government Secretary Eric Pickles is considering calls to bring it forward to November 2012.

In theory, a by-election in the mid-term of the Conservative-led administration and when spending cuts are really beginning to bite should be an opportunity for the opposition party to score an impressive victory over the government.

But both supporters and Tory opponents believe Ms Stuart’s success in holding on to Edgbaston in 2005 and 2010 was largely down to her personal popularity and her willingness to defy the Labour leadership.

If Labour actually loses a seat to the Conservatives in a by-election, it would be seen as a major blow for Mr Miliband. Ms Stuart is planning to leave the Commons only if she succeeds in becoming mayor.

By contrast, Sir Peter Soulsby, former MP for Leicester South, stood down from the House of Commons in March this year once he was named as the Labour candidate, two months before the election took place.

Councillor Deidre Alden (Con Edgbaston), who unsuccessfully stood against Ms Stuart as the Conservative candidate in the 2005 and 2010 general elections, claimed the MP was letting down her constituents by fighting for the chance to become mayor. Coun Alden, who has ruled out standing for Parliament again, said: “She has clearly thrown her hat into the ring for mayor in the full knowledge that, if she is successful,  it will involve letting down those very constituents who – only 18 months ago – she was asking to vote for her on a personal basis, not for Gordon Brown’s Labour, but personally for Gisela because, she argued, she was a good local MP.”

She insisted Labour would face a real struggle in Edgbaston without Ms Stuart as a candidate.

“You can see why Labour would be worried. The only reason they win is because of her personal vote.

“Even the councillors plaster her name all over their leaflets. They present themselves as her team, not the Labour team.”

Birmingham Edgbaston was once seen as a “true blue” Tory stronghold. While boundary and demographic changes mean it is not the natural Conservative seat it once was, it is nonetheless a marginal seat and Labour held the it by only 1,274 votes last year.

Under a radical shake-up of the political map of Birmingham proposed by the Boundary Commission, a new Edgbaston constituency will take in the wards of Moseley & Kings Heath, Selly Oak and Sparkbrook – making it a seat Labour may hope to win – while a new Harborne constituency will be created, taking in much of the old Edgbaston seat, where Conservatives may hope to do well.

However, these changes will not come into effect until 2015 and a by-election will be fought under the old boundaries.