Ann Clwyd - the prime minister's special envoy to Iraq - has been elected to chair the Parliamentary Labour Party (PLP).
Ann Clwyd supported the war against Iraq
Ms Clwyd beat her rival, former minister Tony Lloyd, by just 11 votes.
Voting was 167 to 156. A total of 324 Labour MPs cast a vote, and there was one spoilt paper.
With Labour's majority cut, the job has assumed new importance. As chairman, Ms Clwyd will be charged with ensuring ministers know of backbench concern.
Mr Lloyd, a former foreign office minister, was a strong opponent of the Iraq war.
Ms Clwyd, who was vice-chair of the PLP in the last parliament, was a strong supporter of the conflict. She immediately pledged to work towards uniting the party.
"For many years I was in opposition," she said. "I don't want to be in opposition again and I am sure the majority of my colleagues don't either.
"If there is any problem with dissent I hope we can
somehow avoid that becoming more damaging."
The Cynon Valley MP said she was not bothered by the small scale of her victory. "A win is a win," she said.
The previous chairman, Jean Corston, left the Commons at the election and has been given a peerage.
Last week veteran MP Austin Mitchell said: "The PLP is in a very curious position because we have got the frustrated left and people who you might call the malcontents and they really want Blair to go quickly.
"We have the new chums who are really fairly loyal. I think that means [we need] somebody who is clear-thinking, slightly on the left but above all brave enough to speak out when there are problems."