Labour's conference descended into chaos after delegates narrowly rejected calls for the party to back Remain.
Amid farcical scenes, a motion calling for Labour to campaign to stay in the EU in a second referendum was defeated by a show of hands.
Instead, party members overwhelmingly approved a compromise position backed by Jeremy Corbyn which commits the party to revisiting the issue if it wins the next election.
Wendy Nichols, chair of the party's national executive committee and the official overseeing the votes, said she initially believed the pro-Remain motion had been passed.
But she then appeared to be over-ruled by Jennie Formby, Labour's general secretary and a close ally of Mr Corbyn.
Ms Nichols said: "Sorry I thought it was one way and Jennie said something else."
Furious pro-Remain delegates then demanded that the motion be put to a "card vote", which would accurately show if it had won or lost.
But Nichols told them: "If it was carried I would have said that, it was lost."
The two-and-a-half hour conference debate which preceded the votes had highlighted the deep splits within the party over Brexit.
Numerous delegates called for the pro-Remain motion to be backed, but they were challenged by opponents who said the party must support Mr Corbyn's compromise position.
Shadow Foreign Secretary Emily Thornberry said: "With your endorsement today, conference, with the instructions that I hope you give us today, I believe we must strive day and night, whatever it takes, to keep Britain in the European Union."
But Howard Beckett, assistant general secretary of Unite, said it was be a "car crash" to send Mr Corbyn to Brussels to negotiate a new Brexit deal with Labour committed to backing Remain.
He said: "It is a guarantee that the next election is about Brexit and Brexit only. All our transformative agenda drowned out by Brexit. Jeremy Corbyn is saying to us: do not tie my hands. Allow me to talk of unity because I am a man of unity."
The row also exposed deep splits with the trade union movement, with Unite, the CWU and GMB backing Mr Corbyn, with Unison and the TSSA opposing him.
Labour MP Ian Murray, who backs Remain, said: "It is of course deeply disappointing that we have not chosen to campaign for remain at this stage, as that certainly does not reflect the strong views of the overwhelming majority of our members and supporters.
"It is simply not tenable for our leadership to be neutral when we face the biggest crisis our country has witnessed in modern times."
Stephen Gethins, the SNP's foreign affairs spokesman, said: "Jeremy Corbyn is stuck firmly on the fence, refusing to come down - and today’s votes show the rest of the Labour party is happy to stay there. This is a real abdication of leadership."