Shadow work and pensions secretary Liam Byrne is to resign from Ed Miliband's frontbench team to stand for mayor in Birmingham if the city's voters agree to create the office.

Mr Byrne will quit the shadow cabinet if Birmingham votes yes in May's referendum on having an elected mayor.

A Labour source said Mr Byrne will formally announce his decision to stand in the mayoral contest on Friday.

The source said: "He has talked this over with Ed Miliband and agreed that if there was a yes vote in May, he would step down from the shadow cabinet to fight to become the first Labour Mayor of Birmingham."

Losing Mr Byrne would be a blow to Mr Miliband as he is also the party's policy review co-ordinator.

In government, the Blairite minister served as Treasury chief secretary and left a note to his successor, David Laws, apologising that there was "no money left".

If the referendum results in a decision to create an elected mayor, Birmingham Hodge Hill MP Mr Byrne could face stiff opposition to secure the Labour nomination.

Former MP Sion Simon, who stood down at the 2010 general election to campaign for an elected mayor, will stand.

Another former Labour minister, Gisela Stuart, MP for Edgbaston, could also contest the position along with Sir Albert Bore, the former leader of the city's council.