Jeremy Corbyn has said it is not up to the UK Parliament to block a second Scottish independence referendum.
However, the Labour leader said he does not think a second poll is a good idea, and that he would advise against it.
SNP leader Nicola Sturgeon said Mr Corbyn has taken the “right” position on a second independence referendum.
She tweeted: “I’m not Jeremy Corbyn’s biggest fan but on this he’s right.
“It is legitimate to oppose independence and to argue against a referendum – it’s not legitimate for Westminster to block a democratic mandate and a majority vote in @scotparl for #indyref2”
Mr Corbyn’s comments come after shadow chancellor John McDonnell said a Labour government would not block a future referendum on Scottish independence.
The party in Scotland has campaigned against holding another vote, with Scottish Labour leader Richard Leonard having previously indicated that it would refuse to grant Holyrood the power to stage one.
Asked if he agrees with Mr McDonnell, Mr Corbyn told the BBC: “It’s not up to Parliament to block it, but it’s up to Parliament to make a point about whether it’s a good idea or not.
“I do not think it’s a good idea”
He added: “My view is that I’m not in favour of Scottish independence; the referendum did take place and a decision was reached on that.
“What I’d much rather is a Labour government given the chance to ensure that Scotland also gets the investment it needs, also gets the social justice it needs, and also gets the job opportunities for young people which have been denied.”
Mr McDonnell was criticised by Labour’s MSP group at Holyrood following his comments at an Edinburgh Festival Fringe event.
Mr Corbyn said: “I would advise that we don’t have another referendum, I’m not in support of Scottish independence. What I am in support of is justice for Scotland, and that means investment in Scotland by a Labour government for the whole of the UK.”
A Scottish Labour spokesman said: “Jeremy Corbyn said that he is not in favour of Scottish independence and that he believes a decision was reached when the 2014 referendum democratically affirmed Scotland’s place in the United Kingdom.
“Jeremy Corbyn and Richard Leonard have made clear that there is no economic case for independence, especially with the SNP’s new position of ditching the pound and new policy of turbo-charged austerity to bear down on the deficit.
“What Scotland needs is radical reforming Labour Governments at Holyrood and Westminster.”
SNP depute leader Keith Brown said: “Scottish Labour’s position is fundamentally anti-democratic and Corbyn’s remarks leave it looking even more isolated and irrelevant.
“They must get on the right side of democracy or face electoral disaster, given that polls show that four in 10 Labour voters support independence.”
Scottish Conservative deputy leader Jackson Carlaw said: “Simply put, Jeremy Corbyn has surrendered on a second independence referendum.
“Both he and John McDonnell are preparing to hand Nicola Sturgeon the referendum she wants in exchange for SNP support for a Labour Government.”
Mr Carlaw added: “Scottish Labour has been left dangling in the breeze – they are utterly irrelevant, even to their own party.
“It’s clear who’s in charge of Scottish Labour and it’s not Richard Leonard. It’s a complete betrayal of thousands of Labour voters in Scotland who support the Union.
“It shows once and for all that Corbyn cannot be trusted to defend Scotland’s decision to remain in the UK.”
Scottish Secretary Alister Jack said the 2014 Scottish independence referendum vote should be respected and the “last thing Scotland needs is another damaging and divisive independence referendum”.
Scottish Liberal Democrats leader Willie Rennie said: “I feel sorry for Scottish Labour voters.
“They’ve been hung out to dry time and time again by a leader who gets it wrong on independence and wrong on Brexit.”
He urged people who believe in Scotland remaining in the UK and the UK remaining in Europe to join his party.