Len McCluskey has defended his union's failed attempt to unseat Ian Murray, the Labour MP with the largest majority in Scotland, saying he "had to be called out" because of his lack of support for Jeremy Corbyn.
The Unite union, which Mr McCluskey leads, triggered a selection ballot lask week in an attempt to prevent Mr Murray from being Labour's candidate at the next general election.
However the bid to oust Mr Murray, who in 2015 was the only Labour MP in Scotland, failed by 158 to 13, with Unite the only union failing to back him.
Mr Murray is one of Labour's most vocal anti-Brexit campaigners and was the only one of his party's seven Scottish MPs to face a selection contest after Unite accused him of systematically undermining Jeremy Corbyn.
Speaking at the union's Scottish policy conference in Ayr, Mr McCluskey said the contest had also come about because of attacks on Unite and his resignation as shadow Scottish secretary due to a lack of confidence in Mr Corbyn's leadership.
Mr Murray has previously attacked Mr McCluskey's stance on Brexit, accusing him of being "willing to ignore the plight of the workers he represents by standing in the way of a public vote on Brexit despite it being party policy.”
He has also clashed with Pat Rafferty, the regional organiser for Unite Scotland, over its strategy of signing up its members as Labour affiliate members ahead of the Scottish party leadership contest in 2017.
Mr McCluskey said Unite members saw the actions of Mr Murray as "contemptuous".
However, Mr McCluskey insisted the union knew it would not manage to unseat the MP, who boasts a majority of 15,514 in his constituency.
He said: "We knew full well there was no chance of unseating Ian, he was always going to get the support of his constituency. But, his behaviour - and this was the view of our Scottish membership which I personally support - needed to be called out.
"This is an individual who in 2015 was the single Labour MP, and as such he was the shadow secretary for Scotland.
"He resigned. Not only did he resign from that position, but he took up a post that (then Scottish Labour leader) Kezia Dugdale offered him. She asked him to be Scottish Labour's voice in Westminster. It was an absolute insult to Jeremy Corbyn."
He added that Mr Murray had been a "constant critic" of Jeremy Corbyn and has also attacked the Unite union. "It's as simple as this; if people want to do that, then we will call them out."
Responding to Mr McCluskey, Mr Murray said the union leadership "made a fool of themselves" in the deselection bid.
"Len McCluskey would be better spending his time defending the jobs of his members from Brexit rather than attacking me. He's so out of touch he doesn't even know that I've been re-selected and re-elected since I resigned from the shadow cabinet.
"I'm a working class Labour MP to my core and I put my constituents first, which is why I'm leading the campaign for a People's Vote on Brexit.
"Len claims to be a democrat so he should practice what he preaches. He tried to get rid of me and he failed miserably.
"He should move on and attack the Tories, and whilst he is at it he needs to explain to the millions of people who need a Labour government why his project is double figures behind the worst Tory government and Prime Minister in history."
Mr McCluskey said he hoped members of Mr Murray's branch in Edinburgh would be able to understand why the union took the step to try and trigger the contest.
The union leader also said there were "half a dozen" MPs he believed have behaved in the same way, but he doesn't foresee any other attempts to unseat elected members.
He said: "There are ways of conducting yourself. I think there are some Labour MPs who have behaved appallingly, I could give you a list of half a dozen.
"It's not about disagreeing. All my life I've been a part of the Labour Party and I suspect for most of that time I have been in the minority in terms of my political views.
"I like to think that I've conducted myself, in opposing the majority view in the party, in a way that is considered to be comradely."
When asked if there would be more attempts to trigger contests in local branches, Mr McCluskey said: "I wouldn't have thought so."
Labour leader Jeremy Corbyn threw his support behind Mr Murray on Saturday, saying he "backs all Labour candidates".