Number crunching the Labour leadership vote
The Labour Party has elected Ed Miliband as its new leader. The BBC's Kayte Rath pulls out some of the detail of the voting:
All five candidates - Ed Miliband, David Miliband, Ed Balls, Andy Burnham and Diane Abbott - received their highest percentage of the vote in their home Constituency Labour Party (CLP).
In 112 CLPs David Miliband received more than 50% of the vote, compared with just five CLPs where his brother Ed received over 50% of the vote.
Andy Burnham's CLP support was focused in the North West, where he came first in nine CLPs, plus one outside the North West.
All the candidates - except Ms Abbott - came first in their home CLP. Her CLP, Hackney North and Stoke Newington, preferred David Miliband to her. She was also the only candidate not to come first in any CLP.
Ed Balls came first in two CLPs - Morley and Outwood and Pontefract and Castleford.
When it came to Labour's top 50 marginal seats, David Miliband came top in 39 CLPs, well above Ed Miliband who came top in nine, with Andy Burnham and Ed Balls coming top in one each.
In the 50 safe Labour seats, David Miliband again beat his rivals, coming top in 39 CLPs, followed by Ed Miliband top in nine of them, and Mr Burnham coming first in two.
The highest turnout in a CLP was Arundel and South Downs with 85.9%, while the lowest turnout was in Luton North at 35.5%.
Ed Miliband received the highest percentage of the vote in his home CLP of Doncaster North with 71.26% of the vote. This was followed by Midlothian with 54.6% and Doncaster Central with 54.1%.
He performed worst in Leigh CLP, Mr Burnham's seat, receiving 8.1% of the vote.
Leicester East, one of David Miliband's strongest CLPs, was Ed Miliband's second worst performance, with 11.05%. David Miliband received 74.7% of the vote there, his second highest percentage after his home CLP of South Shields where he got 79.6%.
Ed Balls received the highest percentage of votes in his home CLP of Morley and Outwood, receiving 41.7% of the vote.
He got the lowest percentage of the vote in David Miliband's home CLP, South Shields (1.02%).
Mr Burnham got the highest percentage of votes in his own CLP, Leigh, where he got 69.1% of the vote.
Ms Abbott received 20.55% of the vote in her home CLP, but David Miliband beat her, getting 34.8% of the vote there.
The union with the highest number of votes cast was Unite with 111,270 votes cast. However, this is only just over 10% of the ballots that were distributed by the UK's biggest union, which has a membership of 1,055,074. Unite backed Ed Miliband.
The next two unions with the highest number of votes cast were the GMB (43,106) and Unison (28,142), the two other big unions that had backed Ed Miliband. Again, these votes cast were just a small fraction of the ballots each union distributed.
Unite had the highest number of spoilt ballot papers (15,936), followed by GMB (6,352) and Unison(4,431). It is usual for the highest number of spoilt ballots to be in the union movement. For a ballot paper to be valid union members must tick a box to say they support the Labour party and many failed to do this.
The big three unions all gave their supporting nomination to Ed Miliband. He received 42.63% of the votes cast from Unite members, 42.05% from GMB members and 34.3% from Unison members.
Ucatt also gave Ed Miliband their supporting nomination. The results show 59.3% of the votes cast from its members went to him.
The two other unions to support Ed Miliband, the NUM and Unity did not take part in the ballot in the end.
David Miliband came next in terms of support from the three main unions, receiving 19.57% of the votes cast from Unite members, 22.61% from GMB members and 23.68% from Unison members.
He had secured the supporting nominations of Usdaw and Community, and both delivered for him. From Usdaw he received 54.4% of the votes, and 50.1% of Community votes.
Ms Abbott received supporting nominations from two unions, Aslef and TSSA. For Aslef she was far ahead of her fellow candidates, receiving 44% of the votes cast compared with Ed Miliband who came next with 16.3% of their votes and David Miliband who got 15.4%.
However, Ms Abbott did not come first among TSSA members. She was pipped to the top by David Miliband who took 25.4% of the votes cast, ahead of her 24.74%.
For Ed Balls, the only union to give him their supporting nomination was the CWU. The votes cast show that members followed the recommendation, giving him 37.46% of their votes followed by David Miliband with 17.8%.
Perhaps surprisingly, given talk at the beginning of the contest that it would be Mr Balls who secure more support amongst trades unionists, Andy Burnham performed better than Mr Balls amongst the three big unions securing a higher percentage of their votes.
Mr Burnham received 7.18% of the votes cast from Unite members, compared with Mr Balls at 6.29%, 7.24% from GMB members (5.91% for Mr Balls) and 8.33% from Unison members (7.61% for Mr Balls).