Dan Hodges is a former Labour Party and GMB trade union official, and has managed numerous independent political campaigns. He writes about Labour with tribal loyalty and without reservation. You can read Dan's recent work here

David Miliband realised the game was up in January: his every move was seen as a knife in his brother's back

Westminster being Westminster, there are a lot more people popping up this morning who “knew” David Miliband was set to resign from Parliament than there were at 10.00pm last night when the Mirror broke the story. I freely concede I’m not one of them.

But the moment David Miliband knew he was leaving politics can definitively be dated to the morning of January 9, 2013. That was moment he woke up and saw the press coverage of the speech he’d given in the welfare debate the day before. On the surface it had been a spectacular success. The bill wasn’t just unfair, it was “rancid”, he’d stormed. It was a return to the politics of division. The government that was introducing it was “hard to stomach”. Labour MPs had queued up in Westminster’s Portcullis House to shake his hand, and laud his parliamentary tradecraft.

But the media analysis was different. Some commentators said he had outshone his brother. Others – me included – said he was clearly manoeuvering for a return to the front bench. Most damaging of all, a line in which he said he would accept for the sake of argument the Government’s spending “envelope” was perceived to be an attack on Labour’s deficit stance, and even a move against shadow chancellor Ed Balls.

Looking at those headlines, David Miliband realised that the game was finally up. Over the winter, he and his allies had come to two conclusions. The first was that there was now a chance – if only an outside one – of Ed Miliband winning the next election. The second was that if David wanted to play a part in that Government, he had to return to the front bench before 2015.

Partly this was good politics – David Miliband needed to be seen to be putting his leadership election disappointments behind him, and throwing his shoulder to the Labour wheel. And partly it was for his own personal esteem: if he was to serve under his brother, he needed to at least have some ownership of Labour’s – and his brother’s – victory.

The official line this morning is that January’s welfare speech was simply an intervention on an issue of interest and concern to Miliband and his constituents. And to an extent it was. But in truth, it was also an attempt to see whether it would be possible for him to re-enter the political front line on his own terms. Could he influence and shape a debate in way that avoided accusations he was working the political angles and pursuing hidden agendas?

The answer was no. Whatever he did or said would be run through the prism of his election defeat, his fractious relationship with his brother and the perception of thwarted ambition. And as soon as he came to realise that, then in truth, he only had one route to take.

That didn’t make the decision any easier, and this morning David Miliband’s emotions are raw as he comes to terms with the fact he is turning his back on the party and political arena that have been his life. And he will be missed: Labour’s front bench is hardly groaning under the weight of top-rank parliamentary talent. The Tories will also be having some fun at Labour’s expense, and last night were already briefing that “David Miliband is switching off the lights as he leaves the Labour Party”.

But the reality is he has made the right decision for everyone. His younger brother’s position as leader is secure until the next election. His presence, on either the front or back benches, would indeed have been a distraction. And whatever David or others may feel about his defeat in the 2010 Labour leadership election, it’s Ed Miliband who has earned the right to win or lose in 2015.

Last February David Miliband told the Guardian: “The important thing is that when I think I've got something to say and I think it will help Labour and help the country and help the debate, I should be able to say it and I do say it.” But he isn’t able to. Which is why from now on, he will be saying nothing.