The SNP and Scottish Greens have published details of their new power-sharing arrangement.
The deal will take the Greens into government for the first time anywhere in the UK.
It includes a commitment to hold a referendum on Scottish independence within the next five years, and preferably by the end of 2023.
First Minister Nicola Sturgeon gave details at a briefing alongside the two Scottish Greens co-leaders. The agreement will see two Green MSPs appointed as junior ministers in the Scottish government.
These ministers could be invited to attend cabinet meetings when their portfolios are being discussed, with the Green co-leaders attending cabinet at least twice a year.
The deal was approved by the Scottish cabinet on Friday morning, but still requires the approval of the decision-making bodies of both parties before it can take effect.
The SNP’s national executive committee is due to meet on Saturday and the Greens have scheduled a meeting of their membership for Saturday 28 August.
Both sides want the deal to take effect before Holyrood returns with a statement on the programme for the government on Tuesday 31 August.