Nicola Sturgeon has confirmed she will formally request the powers to hold a second independence referendum by the end of this year.

The First Minister said she will seek the transfer of Section 30 powers from Westminster during the passage of the Referendums Bill at Holyrood.

The legislation, introduced in May, sets out the rules and regulations for future referendums and is intended to pave the way for another independence vote.

Sturgeon has vowed to pass the law by the end of 2019 with a view to holding a fresh independence referendum in the latter half of next year.

The First Minister made the announcement to returning MSPs as she laid out her administration's annual programme for government.

She said the "centrepiece" of her government's new programme deals with the climate emergency but added it could not ignore the "political and constitutional emergency that is engulfing the UK".

Sturgeon was previously refused the power to hold a referendum by then-PM Theresa May back in 2017, and Boris Johnson has indicated he is also opposed to allowing a new independence vote.

But the FM said it "now seems inevitable that there will be an early UK general election" and vowed to put the case for an independence at the heart of the SNP's campaign.

With the Brexit deadline of October 31, Sturgeon said her government remained focused on "ensuring continuity of medicine and food supplies" in the event of no-deal and reassuring EU nationals living in Scotland.

The First Minister said: "As long as no-deal remains a risk, we will be doing everything we can to ensure that Scotland is as prepared as we can be.

"However, unlike the UK Government, we will be honest about the inability to prevent all of the harm that a catastrophic no-deal Brexit would inflict."

She also pledged to "lay the foundation for a new Scottish Green Deal", with a raft of policies designed to boost Scotland's bid to reduce carbon emissions to net-zero by 2045.

The programme for government further committed ministers to installing hundreds of counsellors in Scottish schools - a pledge it failed to meet last year - and to investing £20m over two years towards tackling drug deaths.

Sturgeon detailed plans for 14 Bills in the next year on issues including hate crime, redress for survivors of in-care abuse, and the option of civil partnerships for heterosexual couples.

On an independence referendum, the First Minister said: "I can confirm today that, during the passage of the (Referendums) Bill, we will seek agreement to the transfer of power that will put the referendum beyond legal challenge."

She added: "We have a clear democratic mandate to offer the choice of independence within this term of Parliament - and we intend to do so."

The First Minister insisted Scotland deserves "the opportunity to choose that better, more hopeful future as an independent country" and said her government "is determined to offer it".

On the climate emergency, Sturgeon said: "The year ahead will consolidate Scotland's position as a leader in the battle against climate change."

"It will see landmark policies, long in the planning, come to fruition."

Among those is the Scottish national investment bank, the First Minister said, adding: "Tackling climate change will be central to the investment decisions we make".

She continued: "It lays the foundation for a new Scottish Green Deal, with measures to reduce emissions, support sustainable and inclusive growth, promote wellbeing and create a fairer society."

The government will support the growth of low-emission vehicles including buses along with a "transformational" £500m investment for bus services over the next few years.

Scottish Conservative interim leader Jackson Carlaw slammed the First Minister on her independence referendum push, urging her to "give it a rest".

He said: "It's typical of the First Minister that her statement both began and ended with independence. It really is the be-all-and-end-all for her nationalist government.

"Not only did she confirm her plan to push ahead with an unnecessary and unwanted Referendums Bill, but we also learned the utterly discredited White Paper from 2014 is finally set to be binned.

"The people of Scotland have had enough of this. They simply want Nicola Sturgeon to give it a rest."

Carlaw was met with opprobrium from the SNP benches when he seemed to question if Sturgeon's hair colour was real, in what the FM dubbed an "ill-advised quip".

Responding to the programme for government, Scottish Labour leader Richard Leonard said: "At the weekend, the First Minister wrote in a national newspaper that 'it is more important than ever that the Scottish Government continues to act in a calm, considered and consensual way'.

"Can the First Minister tell us is she calm that housing costs continue to rocket beyond people's means?

"Is she calm that the reliance on food banks in Scotland is at an all-time high?

"Is she calm that public transport is run in the interests of profit, not passengers?"

Scottish Green co-leader Patrick Harvie said the announcement of a "Scottish Green Deal" was a "cheap imitation of his party's own proposals made last week.

Harvie said: "Imitation is the sincerest form of flattery after all... it is gratifying to see the First Minister adopt our language.

"I am obviously pleased that, six months after she declared one, the First Minister has recognised that the climate emergency requires more than just ambitious targets.

"But this programme for government is a cheap imitation of ours. Her version lacks the ambition, scale and courage required of an emergency response."

He added: "The response to the climate emergency cannot be piecemeal. It must mobilise the economy behind a just transition, one that creates jobs, gets Scotland moving and gives people warm homes."

Scottish Liberal Democrat leader Willie Rennie said the government had taken its eye "off the ball" at the expense of public services.

"People across the country are paying the price for this government's ineptitude," he said.

"This is a government whose eye has been taken off the ball because their primary focus is on independence.

"Communities shouldn't lose out because of the SNP's constitutional obsessions. Liberal Democrats demand better for our public services."

Climate:

Tourist tax:

Mental health:

Drug deaths:

NHS watchdog

Civil partnerships

Hate crime and sectarianism

School meals

Poverty and homelessness