MP Norman Baker has resigned from the Liberal Democrat shadow cabinet just as his preferred candidate won the party leadership.

The Lewes MP said that after six years as Shadow Environment Secretary, he was in danger of becoming "stale".

He announced the decision as Sir Menzies "Ming" Campbell was appointed the new Lib Dem leader with the support of 29,697 party members.

Chris Huhne came second with 21,628 votes. In third place was Simon Hughes, the party president, who was eliminated in the first round of the transferable vote contest having mustered only 16,691 votes.

Sir Menzies has been acting leader since Charles Kennedy was forced to quit earlier this year after admitting a drink problem.

He had been the first choice of Mr Baker, Sussex's sole Lib Dem MP, who said he was "very pleased" with the result.

He said: "Ming is a parliamentarian very well-respected by MPs in all parties and I am confident the party will continue to grow under his leadership."

But Mr Baker also chose the moment to announce he was ending his role in front line politics to cut his workload and concentrate more on constituency matters.

The MP, who has been a passionate advocate of green issues and staunch opponent of nuclear power, admitted the move would surprise many observers.

He said: "I have spent the majority of my parliamentary life working on the environment portfolio as a front bench spokesman and I feel that the election of a new leader offers a good opportunity for a fresh face to take over.

"I am hugely committed to this agenda but I recognise that there is a danger of a person becoming too stale if they stay in the same role too long. That is a lesson Tony Blair would do well to learn.

"I recognise this decision may surprise some, but it is better to have people ask 'Why is he going?', rather than 'Why isn't he going?'.

"I now want to free up time to devote to other political issues which I feel strongly about. I will, of course, continue to support my party and serve my constituents to the best of my ability."

After the leadership results were announced, Sir Menzies told the party at its Westminster headquarters it had confounded expectations in the Dunfermline West by-election last month.

He said: "The challenge is for all of us now to lead this party back towards government at the next General Election."