Labour and the Liberal Democrats have confirmed they will not support Scottish Government proposals for a second independence referendum in the wake of the Brexit vote.

With the Tories also to oppose the legislation, First Minister Nicola Sturgeon will need to rely on support from Green MSPs to get a Bill through Holyrood.

Hours after the result of the European referendum was announced in June, the SNP leader said her government would start working on legislation for another vote on Scotland's place in the UK to be held if this is the "best or only way to protect our place in Europe".

READ MORE: Kezia Dugdale brands Tories 'Scotland's Brexit party' as she launches attack on leader Ruth Davidson

Days later both Labour and the Lib Dems backed a Holyrood motion giving the Scottish Government a mandate for discussions to explore options for protecting Scotland's relationship with the European Union (EU).

Liberal Democrat leader Willie Rennie said since then Ms Sturgeon had consigned the cross-party consensus on "to the dustbin".

He claimed the First Minister had failed to make good on her pledge to explore all options to protect links with the EU and that independence was the "only solution" she had offered, accusing her of having spent the summer "hyperactively bouncing around the country" in support of this.

Writing in The Scotsman newspaper, Mr Rennie said: "For someone who said she did not favour Brexit and she did not want it either she is showing a remarkable degree of enthusiasm ever since.

"In contrast she has made little attempt to propose a solution that may garner the support of my party and others.

"I know her activists believe this is a golden opportunity to win independence but she has a responsibility to lead the country, not just her party."

READ MORE: Theresa May pledges to get 'best deal' for British business in Brexit talks​

Mr Rennie's comments came just days before Ms Sturgeon is to announce her legislative plans for the coming year to MSPs at Holyrood.

At the same time, Scottish Labour leader Kezia Dugdale also made clear her opposition to another vote on independence.

Ms Dugdale insisted: "The manifesto is very clear, we're opposed to a second referendum in the lifetime of this parliament."

She was speaking a day after Owen Smith, her preferred candidate in the UK Labour leadership race, said he would not oppose a second Scottish independence referendum, a view also recently expressed by her Scottish deputy Alex Rowley.

Ms Dugdale, who was outlining her alternative programme for government, said: "We've been very clear, there is a very clear statement in the manifesto that we put before the Scottish people in May which is the foundation of this alternative programme for government that we're putting forward today and how we'll conduct ourselves over the five years of the next parliament. We're opposed to a second referendum in the lifetime of this parliament."

When Holyrood debated the result of the European referendum in June, Ms Sturgeon told opposition MSPs their support for the motion giving her a mandate for talks "is not a vote for a referendum on independence".

Mr Rennie claimed: "From that moment on, she has talked about little else, betraying those words she uttered in Parliament and consigning the consensus to the dustbin."

READ MORE: Kezia Dugdale brands Tories 'Scotland's Brexit party' as she launches attack on leader Ruth Davidson

A spokesman for the First Minister said: "It is perhaps not too surprising that the Lib Dems are siding with Tory Brexiteers over the interests of Scotland - as students south of the border know to their cost, Liberal Democrat promises of support are not worth the paper they are written on.

"However, the fact is that Willie Rennie is profoundly mistaken - and his criticisms of the independent expert group, which met earlier this week, are deeply misplaced. The position the First Minister laid out on June 24, and which Mr Rennie backed in a parliamentary vote, is unchanged.

"The First Minister is clear that protecting Scotland's interests and our place in Europe is her starting point. As recently as last week, she made clear that the Scottish Government will use whatever influence it has to shape the best outcome for the whole UK and will work to protect Scotland's interests as far as possible within the context of UK discussions. Indeed, she has appointed a dedicated minister to lead this process.

"However, she has also been clear that the option of independence should be on the table if it becomes clear that it is the best or only way of safeguarding our interests. Clearly, Willie Rennie thinks we should stick with Westminster regardless of the damage it does to our interests.

He added: "People will see today's intervention exactly for what it is - a desperate attempt by Willie Rennie to attract attention for his increasingly irrelevant party. The Scottish Government will continue to focus on the important work of protecting Scotland's interests."

READ MORE: Theresa May pledges to get 'best deal' for British business in Brexit talks​

Ross Greer, external affairs spokesman for the Scottish Greens, said: "The lack of any significant change in the Brexit situation appears to have prompted the leader of Holyrood's smallest party to flounce off in a huff.

"This is hardly the responsible attitude Scotland needs at this time. Thankfully, the Scottish Greens remain at the forefront of the campaign to keep Scotland in Europe. Over 30,000 people signed our petition calling on Holyrood to explore every option.

"I look forward to the statement from the First Minister next week on the European situation and the entire Green MSP team will continue to engage constructively with the Scottish Government and other interested parties. All avenues must be exhausted to maintain Scotland's international links, and our social, economic and environmental protections. If the Lib Dems would rather side with a hapless UK Tory Government, they're welcome to that."