John McDonnell has apologised for calling Labour MPs who are trying to oust Jeremy Corbyn "f***ing useless".
The shadow chancellor made the outburst on stage at a Labour comedy gig shortly after the party's National Executive Committee ruled the party leader would automatically be on the ballot in a leadership contest.
The incident came as Labour MPs complained of harassment and abuse as the dispute between them and Mr Corbyn's supporters became increasing bitter.
Last week a brick was thrown through the window of Angela Eagle's constituency office following the announcement she will stand against the Islington North MP for leader.
Challenged about his comments on Sky's Murnaghan show, Mr McDonnell said: "It wasn't good - I'm extremely contrite about that.
"I promised Jeremy I wouldn't appear on any stand-up comedy events or make any more jokes and I'd behave myself and I let him down I'm afraid, so I'm extremely contrite about that."
Mr McDonnell, Mr Corbyn's closest ally, was on stage at the O2 Forum in Kentish Town when he told the audience: "They have been plotting and conniving. The only good thing about it is that, as plotters, they're f***ing useless."
His comments sparked laughter among the audience, but his comments have been criticised for fuelling an atmosphere of intolerance in the party.
Mr McDonnell said he "let myself down" and promised to conduct the debate in a more "comradely way".
He added: "One thing about me is what you see is what you get, and if I make a mistake I admit it and I apologise and I move on.
"But we are human beings. I know we are politicians but we are also human beings as well.
"That was done, it was a stand-up for Labour comedy event and all the rest of it. I made a mistake, apologise and move on.
"The most important thing is that the debate we have from here on in is that comradely, friendly debate. And it was last year - all the candidates got on pretty well all throughout the campaign. I'm hoping that's what will happen this time."
He also said he wanted to see "a range of candidates" in the Labour leadership contest, and spoke out against attempts to "bully" Ms Eagle off the ballot paper.