Jeremy Corbyn was accused of a “stitch-up” on Monday night after Labour MPs claimed one of his lieutenants changed the course of a key Brexit vote to prevent a damaging defeat for him.

Amid chaotic scenes at the party’s conference, Jennie Formby, Labour’s general secretary, appeared to overrule the chairman of the party’s ruling body who thought members had rejected the leader’s Brexit policy.

Had he lost the vote, Labour would have become a Remain-backing party against his wishes, leaving his future in doubt. Instead, Labour goes into the next general election promising a second referendum without saying whether it backs Leave or Remain.

A shadow cabinet source described the result as a “total stitch-up” while another Labour MP said an “unelected bureaucrat” had been caught overruling the elected chairman of the ruling body “live on national television”.

Mr Corbyn’s attempts to prepare his party for a general election have been totally overshadowed by rows over Labour’s Brexit position that dominated the conference. It came to a head on Monday night when members voted on a motion calling for Labour to back Remain, rather than simply hold a second referendum, as Mr Corbyn has promised.