Scottish Labour leader Kezia Dugdale was set to drop her party's opposition to a second independence referendum in the immediate aftermath of the UK's decision to quit the European Union, Nicola Sturgeon claimed.

The SNP leader and First Minister said Ms Dugdale had told her that the vote for Brexit in June 2016 "changed everything" and that "Labour should stop opposing a referendum".

Ms Sturgeon made the claim as party leaders north of the border went head to head in the final TV debate of the General Election campaign.

Afterwards Ms Dugdale stated on Twitter that "any suggestion that I ever said to Sturgeon that I'd change Labour's position on #indyref2 is a categoric lie", claiming this shows how "desperate" the First Minster is.

The showdown took place less than 36 hours before polling opens on Thursday, and saw Ms Sturgeon, Ms Dugdale, Scottish Conservative leader Ruth Davidson and Willie Rennie of the Scottish Liberal Democrats clash on issues including Brexit, security and the so-called "rape clause".

But some of the most heated exchanges in the STV Scotland Debates programme were about the issue of independence, with the Scottish Government having already put forward plans to hold another referendum at the end of the Brexit process.

Almost two-thirds (62%) of Scots wanted the UK to stay in the European Union (EU) and Ms Sturgeon claimed in the wake of that vote that the Scottish Labour leader had told her she thought her party should drop its opposition to a second independence referendum.

The First Minister said: "I respect the fact that many people disagree with me on a referendum and independence but I also believe that Scotland needs to have a choice at the right time about our future, because the consequences of not having a choice are that we may have to accept a disastrous Brexit that will put tens of thousands of Scottish jobs on the line."

She told Ms Dugdale: "You used to agree with me on that Kezia. You and I spoke the day after the EU referendum and you told me then you thought the change taken by Brexit meant that you thought Labour should stop opposing a referendum.

"You've changed your mind but why should everybody else in Scotland be denied a choice?"

Ms Davidson asked the First Minister: "Did you just tell people you had a private conversation with Kez Dugdale last June where she said she was going to drop Labour's opposition to independence?"

Ms Sturgeon replied: "She said that she thought Brexit changed everything and she didn't think Labour could any longer go on opposing a second independence referendum."

Ms Dugdale later insisted it was "nonsense" to suggest she would do anything other than fight for Scotland to remain within the UK.

Asked about her "tete-a-tete" with the First Minister, Ms Dugdale told the audience: "We did speak on the phone after the European Union referendum result to share how devastated we were about it because of the damage it was going to do to Scotland's economy and to future jobs.

"The idea that I would do anything other than protect the United Kingdom and fight for us to remain within the UK is absolute nonsense."

But Ms Sturgeon claimed: "I know what was said. I'm not having a go at you, Kezia, you're entitled to change your mind.

"I think what you're not entitled to do, though, is to always be having a go at me just for wanting to give people in Scotland a choice."

There were also fiery exchanges when the SNP, Labour and Lib Dem leaders all attacked the Conservatives over the so-called ''rape clause''.

UK Government welfare changes mean women will no longer be able to claim tax credits for more than two children, with an exception to the rule being applied for those who conceived as a result of rape.

Ms Sturgeon said many people had been ''appalled'' by the policy, which she said would save £300 million from the benefits bill at the same time as the Conservatives spend £380 million on a tax cut for the richest 15%.

''You could use that money that is going to the richest to get rid of that two-child tax cap and the rape clause,'' Ms Sturgeon said.

''Why don't you ask your bosses in Westminster to make that choice and remove the rape clause once and for all?''

And Ms Dugdale told the Conservative: ''Your Tory Party is just as callous and heartless as it has always been, is it not?''

But Ms Davidson said: ''This is about ensuring that people who have had children in the very worst of circumstances get extra help.

''This is about limiting child tax credits to the first two children, but it means that, for example, people who have been raped aren't affected by that, it means they get to have that extra help.''