Labour’s deputy leader has cautioned against going “anywhere near” another Scottish independence referendum as she claimed a Labour government would “make the changes we need”.

Angela Rayner told a crowd in Edinburgh that having a Labour government after the next election would “make all the difference” in policies enacted in Scotland.

The comments come as the Scottish Government is locked in a legal battle that could allow Holyrood to legislate for another vote.

Speaking during a show at the Edinburgh Festival Fringe with broadcaster Iain Dale, Ms Rayner also reiterated her party’s reluctance to work with the SNP after the next election to lock the Tories out of Downing Street.

“It’s not a possibility that we would work with the SNP – we want to win a majority,” she said.

She added: “I don’t think the people of Scotland should leave behind the people of Ashton-under-Lyne, either.

“The poverty that we face is the poverty they face and we both need a Labour government in order to make the changes that we need to make, whether that’s in Scotland or in England.”

When asked about the likelihood of winning seats north of the border in the next election, Ms Rayner said the party was “making progress” in Scotland.

“Respect is earned, it’s not given and I think we’ve been making progress to earn that respect,” she said.

“But I think breaking up the union is not the answer.

“Leaving us to perpetual Conservatism at Westminster is not very nice…but actually having a Labour government could make all the difference.”

Ms Rayner went on to say that the Labour Party was “behind” on devolution, adding that “actually engaging with devolution could be the key”.

She continued: “Scotland is absolutely key, it’s key to Manchester, it’s key to the whole of the United Kingdom.”

“I’m against us going anywhere near a second referendum, if I’m honest. I think the Brexit referendum was enough for me.”

When asked if her position showed “disrespect” to the people who voted for the SNP or Scottish Greens in last year’s Holyrood elections, Ms Rayner pushed back.

“I wouldn’t say it’s me showing disrespect, I’d say it was me being honest as a politician with people,” she said.

“You can disagree with me on that position – and that’s completely fine…but I think it’s better for Scotland and I think it’s better for my constituency that we’re part of the union, but I think it’s also equally important that we don’t have the Conservatives in power in Westminster – I think that is the biggest damage that’s being done in Scotland.”

Lord Advocate Dorothy Bain QC last month referred a prospective referendum Bill to the Supreme Court in a bid to ascertain if it was within the powers of the Scottish Parliament.

Oral arguments will be presented to the Court on October 11 and 12.

Meanwhile, the deputy leader also said that her party was still struggling to communicate the “detail of Brexit” to the country.

The event in Scotland’s capital was also interrupted by environmental campaigners from the group Green New Deal Rising, who asked to meet with Ms Rayner, but were shouted down by members of the audience.

Four campaigners held up a banner during the final minutes of the show, while another videoed their exchange with the leader.

The campaigner recording the disruption was removed by security.

In response to a question from the campaigners, Ms Rayner stressed the need to tax the profits of oil and gas firms such as BP – which reported a profit of £6.9 billion in the second quarter of this year – as well as building green industries across the country.