Ed Miliband has seized the Labour leadership in a dramatic, knife-edge victory that left his elder brother David's political dreams in tatters. The younger Miliband, who ran a left-leaning campaign and only emerged as favourite in the last 24 hours, declared himself proud and elated as he pledged to reunite the party and put it back on the road to power. But his victory was not without controversy as he won by a narrow margin – 50.65% of the vote to 49.35% for his brother – and thanks in large part to a strong vote from the unions. David Miliband received stronger backing from MPs and MEPs and from party members. MPs who supported David Miliband warned that Ed Miliband's reliance on the union vote was a "disaster" for the party – leaving it open to charges that its leader would be in the pocket of its leftwing paymasters, and wide open to attack from the Tories and rightwing elements in the media. Amid emotional scenes, the two brothers, whose battle had at times become fraught and bitter, hugged after the result was finally called in Ed's favour. After 10 nail-biting minutes during which details of the votes were read out in stages with no single candidate reaching the required 50% until the fourth and final round, Ed Miliband was declared the winner.