Media playback is unsupported on your device Media caption Nicola Sturgeon: "We will seek agreement to the transfer of power that will put the referendum beyond legal challenge."

First Minister Nicola Sturgeon is to demand Holyrood be given the power to hold a second independence referendum.

Ms Sturgeon confirmed to MSPs that she would "seek agreement to the transfer of power that will put the referendum beyond legal challenge".

As she unveiled her government's plans for the year, she said the parliament had a clear, democratic mandate.

Prime Minister Boris Johnson has indicated his opposition to a second vote on Scotland leaving the UK.

Ms Sturgeon told the Scottish Parliament it "now seems inevitable that there will be an early UK general election".

She added: "Let me be crystal clear today - the SNP will put Scotland's opposition to Brexit and our right to choose independence at the very heart of that contest."

Ms Sturgeon said the referendum bill that was introduced to Holyrood earlier this year was about to resume its parliamentary progress.

The bill is expected to be passed before the end of the year and the first minister has previously said she could hold a referendum in the second half of 2020.

The UK government would need to transfer power - through a Section 30 order - to allow a second referendum to be held but it has so far rejected such an agreement

Ms Sturgeon told MSPs her government intended to offer the choice of independence within this term of parliament, which ends in May 2021.

Scottish Conservative interim leader Jackson Carlaw said it was "typical" that the first minister's programme for government statement "both began and ended with independence".

"It really is the be-all-and-end-all for her nationalist government." he said.

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

Image copyright Andrew Cowan Image caption Scottish Conservative interim leader Jackson Carlaw said the statement "both began and ended with independence"

Green new deal

The first minister's speech detailed the 14 bills and other measures the Scottish government intends to bring forward over the next year.

The "centrepiece" of that would be work to tackle the climate emergency, she said.

Ms Sturgeon promised a "Scottish Green New Deal" that would start to create the right conditions to kick-start investment and make a "significant impact" on greenhouse gas emissions.

Its commitments include £500m for improved bus priority lanes to tackle congestion and increase usage.

It would also see further electrification of the railways and increase low carbon heating in new homes.

Ms Sturgeon told MSPs in the Scottish Parliament that while the Westminster government was shutting down, the Scottish government was "stepping up".

Bills for introduction in 2019-20

Animal Health and Welfare (Amendment) Bill - will increase the maximum penalties for the most serious animal welfare offences to five years imprisonment and/or an unlimited fine.

- will increase the maximum penalties for the most serious animal welfare offences to five years imprisonment and/or an unlimited fine. Budget Bill - Annual legislation which provides parliamentary approval for the Scottish government's spending plans and allocation of resources.

- Annual legislation which provides parliamentary approval for the Scottish government's spending plans and allocation of resources. Circular Economy Bill - includes encouraging re-use of products and resource waste. It will allow charges to be applied to single-use coffee cups.

- includes encouraging re-use of products and resource waste. It will allow charges to be applied to single-use coffee cups. Civil Partnership Bill - will make civil partnerships available to mixed-sex couples in Scotland.

- will make civil partnerships available to mixed-sex couples in Scotland. Continuity Bill - provides ability to maintain alignment with EU law in devolved areas after Brexit.

- provides ability to maintain alignment with EU law in devolved areas after Brexit. Defamation and Malicious Publications Bill - will simplify and modernise the law of defamation.

- will simplify and modernise the law of defamation. Uefa European Championship Bill - ahead of Glasgow's participation as a host city in the Uefa European Football Championships in 2020, the bill will prohibit ticket touting and make provisions to protect commercial interests.

- ahead of Glasgow's participation as a host city in the Uefa European Football Championships in 2020, the bill will prohibit ticket touting and make provisions to protect commercial interests. Forensic Medical Services (Victims of Sexual Offences) Bill - will aim to improve services for victims of sexual offences, including ensuring their cases are handled more effectively by the justice and healthcare systems.

- will aim to improve services for victims of sexual offences, including ensuring their cases are handled more effectively by the justice and healthcare systems. Good Food Nation Bill - introduces a statutory framework as part of efforts to promote healthier and more sustainable local produce.

- introduces a statutory framework as part of efforts to promote healthier and more sustainable local produce. Hate Crime Bill - consolidates and updates existing hate crime legislation.

- consolidates and updates existing hate crime legislation. Heat Networks Bill - brings regulation of the heat network sector to support, facilitate and create controls in development of district and communal heating infrastructure in Scotland.

- brings regulation of the heat network sector to support, facilitate and create controls in development of district and communal heating infrastructure in Scotland. Redress (Survivors of In Care Abuse) Bill - establishes a financial redress scheme for survivors of historical child abuse whilst in care in Scotland.

- establishes a financial redress scheme for survivors of historical child abuse whilst in care in Scotland. Rural Support Bill - introduces regulation-making powers for Scottish ministers to amend or replace the EU Common Agricultural Policy elements of retained EU law.

- introduces regulation-making powers for Scottish ministers to amend or replace the EU Common Agricultural Policy elements of retained EU law. Transient Visitor Levy Bill - creates a discretionary power for local authorities to apply a tax or levy on overnight visitor stays.

Measures tackling climate change

In April, Ms Sturgeon declared a "climate emergency" in her speech to the SNP conference.

She later said the Scottish government would legislate to reduce greenhouse gas emissions to net-zero by 2045.

The package of measures includes:

More than £500m in improved bus priority infrastructure

Putting the Highlands and Islands on a path to becoming the world's first net-zero aviation region by 2040 (trials of low or zero emission flights will begin in 2021)

reduce emissions from Scotland's railways to zero by 2035 through the continued electrification of the network, as well as battery-powered trains and exploring the potential of hydrogen-powered trains

An additional £17m to support the demand for ultra-low emission vehicles (ULEVs).

ensuring that from 2024, all new homes must use renewable or low carbon heat.

The Scottish National Investment Bank's "primary mission" will be helping Scotland's economy reduce carbon emissions to net-zero.

Legislation that will allow charges to be applied to single-use coffee cups will be brought in under the Circular Economy Bill, the first minister added.

The Scottish Greens said the programme for government "lacked the ambition, scale and courage" required to tackle the climate emergency.

The party's co-leader Patrick Harvie said: "Scotland needs a Scottish Green New Deal which recognises the purpose, scale and bravery required of an emergency response."

One insult, one apology: Holyrood is back

Image copyright Getty Images

Analysis by BBC Scotland political editor Brian Taylor

The Holyrood head count thus far today? One insult (at least). One apology. Tame, of course, by comparison with the visceral, permanent feud that is Westminster. But give them time.

I write "head count" advisedly. The topic was tonsorial. Raised, very unwisely, by Jackson Carlaw, he who once again finds himself the interim leader of the Scottish Conservatives.

Under teasing attack from the first minister, Mr Carlaw retorted: "At least I've got a full head of my own naturally coloured hair!"

The chamber, Tories included, squirmed and glanced furtively at their neighbours. Did he just say that?

Read more from Brian here.

Meanwhile, other measures in the programme for government include:

bringing forward the date for the first Scottish Child Payments to Christmas 2020

making the first Job Start Payments in spring 2020

announcing the first wave of new or refurbished schools via a £1bn school investment programme

Other bills include one that will enable councils to introduce a tourist tax.

To help improve mental health care, the first minister said her promise to install 350 counsellors in schools - a commitment made last year - would be achieved by this time next year.

The Scottish government will also work with councils on a "community wellbeing service", with this supported by £17m of additional funding, she said.

In addition, £10m will be made available in each of the next two years to try to deal with the "public health emergency" caused by drug abuse.

There was a record 1,187 drugs deaths in Scotland last year.

Another bill will see men and women able to have civil partnerships rather than marriage in Scotland.

Scottish Liberal Democrat leader Willie Rennie said that the government had taken its eye "off the ball" because its primary focus was on independence.

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

Scottish Labour leader Richard Leonard welcome the commitments on climate change but asked what the first minister was doing about rising housing costs and the reliance on food banks.