Labour leader Jeremy Corbyn has said he supports Ian Murray MP, who survived an attempt by the Unite union to oust him.
Ian Murray was re-selected to contest Edinburgh South at the next general election after all four member branches in the constituency voted to back him at a meeting in Edinburgh on Thursday evening.
Five trade union and affiliate branches also supported Mr Murray, though Unite voted in favour of a contest to replace him.
Under Labour Party rules, a contest to replace a sitting MP is triggered if a third of local members or affiliated unions back it.
READ MORE: Ruth Davidson says she conducted 'due diligence' over £50,000 role at lobbying firm
READ MORE: Scottish independence: Val McDermid’s attack on BBC’s Laura Kuenssberg says much about movement – Brian Wilson
Mr Corbyn told the PA news agency: "I back all Labour candidates.
"I'm the leader of the party, we are proud that our party is a democratic party, the local constituencies choose their candidates and my job is to support every Labour candidate and that's exactly what I'll be doing."
Mr Murray said he looks forward to fighting the next general election and is now focused on standing up for the 80,000 people in his constituency.
Speaking after he was re-selected, he said: "It is a huge honour to have been re-selected as Labour's candidate in Edinburgh South for the forthcoming general election.
"Representing my home city of Edinburgh is a great privilege, and I have always put this constituency first and foremost."