The Scottish Green party and SNP have agreed a deal which will see the Greens support Alex Salmond as first minister, in return for legislative action on climate change.
The partnership falls short of a full coalition and is looser than the 'confidence and supply' model mooted earlier in the week. Instead the two parties describe it as a cooperation agreement.
SNP leader Mr Salmond and the Green's Robin Harper released a joint statement confirming the two parties would cooperate.
The Greens will vote for Mr Salmond as first minister and approve SNP ministerial appointments. In return, the nationalists will nominate one of the Green MSPs to chair a committee and will back a Scottish climate change bill.
Unlike a formal coalition, the Greens are not obliged to back any no confidence motions against the SNP or support Mr Salmond's budget.
Mr Salmond said: "This is a serious and important co-operation agreement that will set the tone for the four years of this parliament. Their formula for cooperation across parties short of formal coalition is an excellent example of the consensus we are seeking to build in the parliament, and sets a positive tone for the incoming government."
The Green party only holds two seats in the Scottish parliament and their cooperation will still leave the SNP short of a majority.
However, Mr Salmond insisted today's deal is still significant. "The Scottish Greens represent a substantial body of opinion in Scotland, regardless of MSP numbers," he argued.
Robin Harper, the Greens co-convener, said: "I am proud to have signed this agreement today. We have between us laid the foundations for a progressive new politics for Scotland. These constructive discussions have identified many shared objectives, including blocking nuclear power, tackling climate change, and extending the powers of the Scottish parliament.
"This is the beginning of a process, and we will work positively with the SNP administration on issues of broad agreement. There remain significant policy differences between the two parties, however, and on those issues the Greens will continue to promote our distinctive policies."
The SNP have failed to obtain the Liberal Democrats' support for a formal coalition. The Lib Dems claim they will not work with the SNP because of their commitment to a referendum on Scottish independence.
However, the nationalists said the Lib Dems were still refusing to talk even with the offer of no pre-conditions. A SNP spokesman suggested to politics.co.uk that the party has been shocked by their poor electoral showing and is retreating to the backbenches to consider its next move.
Even with Green support, the SNP will now have to attempt to form a minority government.
Even though the Lib Dems have not entered into a confidence and supply agreement, the spokesman said the SNPs are still confident the Lib Dems will vote with them on many issues. It would damage their credibility not to keep manifesto promises when these overlap with the SNP's, he added.