Image copyright PA Media Image caption Labour delegates voted against composite 13 which would have seen the party backing Remain in any future referendum.

Thirteen was lucky for the Labour leader.

To use the jargon, the 'composite', a plan to force him to campaign straight away to stay in the EU failed.

A vote was taken by a show of hands that the chair of the session wasn't even sure which way it had gone to start with, admitting, "I thought it was one way, Jennie [the party's general secretary and vital ally of Jeremy Corbyn] said something else."

The chants of 'Oh Jeremy Corbyn' rang out around the room as activists absorbed the result, that they, and most of the unions had got their way after hours of vigorous debate and lobbying even by some of the party's most senior MPs.

The policy will not, therefore, change.

So Labour will go into the general election without picking a side in the toxic Brexit debate.

For the leader's inner circle, that is a perfectly logical position to take - the only way that Labour can appeal to voters on both sides of the argument.

But to scores of Labour MPs and swathes of the party's members, it is not just a confusing policy to explain on the doorstep but a political mistake for a party whose heart is with Remain.

One senior figure told me: "If you need a flow chart to explain your position you are going to lose a general election."

The argument was won today though less on the merits of the neutral policy, but by the way the conversation turned into a test of loyalty to Jeremy Corbyn.

"Back the leader," members cried out from the platform.

His biggest union backer proclaimed "I implore you, give him the backing he needs."

During some moments of the debate it felt not so much a discussion about what the right policy is for the party, or indeed the country, but a contest to see how many delegates would swear allegiance to the leader.

Given how bumpy the last few days have been there are plenty of people in Brighton who confess privately they are desperately worried about the state of the play.

One senior member of Mr Corbyn's team told me "we're in a very bad place."

Another member of the shadow cabinet told me this week the party may as well have "big arrows above us saying we're going to lose" saying the leadership is "bonkers and bunkered".

There seem to be precious few Labour MPs actually here this year. Their absence telling.

Of course the view of doom is far from universally shared.

Another frontbencher said "it's just all nonsense - once we get into an election it won't even be about Brexit."

And the delegates here today plainly disagree, backing the leader in that crucial vote.

Image copyright Getty Images Image caption Shadow Brexit secretary Sir Keir Starmer said he was "disappointed" by the vote

But it's worth remembering that most of the members in Brighton this week are part of the Corbyn-backing Momentum campaign group - party insiders estimate as many as 75 per cent are from that side of the party where loyalty to the leader is the order of the day.

So the vote today was won by Jeremy Corbyn with his effective political fan club and most of the unions.

Labour in Brighton today had to choose between staying in the EU, and sticking with their leader.

They chose him. But not without controversy, and it has not closed down the arguments over the EU.

And the classic choice for political parties is whether to please themselves, or please the wider public to win.