Gordon Brown privately intervened in the Labour leadership election by ringing Lord Prescott to try to persuade him not to put out a statement in support of David Miliband, the Guardian has learned.

The former prime minister rang Prescott after the Ed Miliband camp heard word that he was swinging behind David Miliband. Prescott was said to be impressed with the way the shadow foreign secretary was defending Labour's record in office over the previous 13 years.

The disclosure about Brown, who refused to express any preference during the leadership contest in public, came as David Miliband prepares to bow out of frontline British politics. The shadow foreign secretary is expected to release a statement tomorrowafternoon announcing that he will not contest elections to the shadow cabinet. His decision will disappoint supporters who had hoped that David Miliband would bolster his brother and provide an important link with Labour's election-winning past.

Concerns that Ed Miliband was dismissive of Labour's electoral success prompted Prescott to issue a barely-coded statement supporting David Miliband. On his blog, Prescott said he supported candidates that backed Labour's achievements in office and praised the elder Miliband.

The Guardian also understands that consideration was given to Tony Blair and Prescott putting out a joint statement in support of David Miliband. The plan was dropped after David Miliband's camp feared that an endorsement from the man that won Labour three elections would damage his chances of being elected due to his unpopularity with some constituency members.

David Miliband gave a taste of his frustration at the manner of his defeat when he reacted angrily to his brother's description of the Iraq war as wrong. The shadow foreign secretary, who has been praised for the dignified way in which he accepted defeat, chided Harriet Harman for clapping his brother's description of the war as wrong. Harman, in common with David Miliband, voted in favour of the war in 2003. With a thunderous look on his face, as he listened to his brother's speech, the older Miliband could be seen saying to Harman: "You voted for it. Why are you clapping?" With a fixed smile on her face Harman responded with the words: "I am clapping because, as you know, I am supporting him." The exchange, picked up by an ITN camera trained on David Miliband during his brother's entire speech, came after the new Labour leader delivered an unequivocal declaration about the war.

"I do believe that we were wrong. Wrong to take Britain to war and we need to be honest about that," he said. "Wrong because that war was not a last resort, because we did not build sufficient alliances and because we undermined the United Nations. America has drawn a line under Iraq and so must we."

The brief outburst by David Miliband showed his acute sensitivity about one aspect of the Labour leadership contest where he believes his brother behaved in a disingenuous way. Ed Miliband said early on during the contest that the Iraq war had been a mistake. David Miliband slapped down his brother in July by saying that Diane Abbott was the only leadership candidate who could credibly claim to have opposed the war. Ed Miliband, who was teaching in the US at the time of the war, insisted he had opposed military action at the time.

Aides to David Miliband were relaxed last night that his private frustration over his brother's handling of Iraq had come into the open. "That's what he thinks," one friend said.