IT was flagged up as the biggest test of the SNP minority government and its ability to run the country. The Nationalists needed their budget passed by parliament if they were going to put their policies into practice.
At the last minute, Alex Sa
lmond even threatened to force an early election if the £30 billion spending plans were thrown out.
But, in the end, MSPs approved the budget by 64 votes to one, with 60 abstentions – "a majority of just 63" as one SNP backbencher commented wryly.
And it was Labour who were left looking as if they did not know how to handle the politics of a parliament where every party is a minority.
Finance Secretary John Swinney hailed the result as a historic achievement and "an enormous step forward" in delivering the SNP's programme.
"Everyone said it would be our biggest challenge – we have just passed our biggest challenge," he declared.
Of course, the Nationalists needed a little help from some new-found "friends" as well as their enemies.
The Tories and independent Lothians MSP Margo MacDonald sided with the SNP in last night's vote – as they did in the first vote on the budget last month – but only in return for concessions from the Government.
The Tories secured extra money for police recruitment, speedier implementation of business rate cuts for small firms and the promise of a drugs strategy to be published before the summer recess.
Ms MacDonald got the promise of a "capital city supplement" in next year's budget to recognise the extra financial burden Edinburgh shoulders on behalf of the whole country and a hint of an increase in health funding in Lothian.
And the Greens, whose abstention in last month's vote allowed the budget to pass its first stage by 64 votes to 62, were rewarded with more money to tackle climate change and extra funding for bus services.
The SNP says Labour and the Lib Dems could have gained something out of the budget if they, too, had played their cards better. But one insider says that, despite Labour claims after last year's elections that they would be looking for opportunities to get their policies accepted by the parliament, neither they nor the Lib Dems made any approaches to the Government during the whole budget process.
Labour insists it did engage with the process, putting forward amendments as the budget made its way through committees – but they failed to persuade anyone else to back them.
So Labour and the Liberal Democrats came away with nothing.
During yesterday's debate in parliament, Mr Swinney accepted a Labour amendment – dubbed "motherhood and humble pie" by Ms MacDonald – which asked the Government to seek ways of expanding skills training and securing minimum standards of service for vulnerable groups.
Yet having succeeded in getting their paragraph incorporated in the budget motion, Labour then abstained rather than vote for it – tactics Mr Salmond described as "bizarre, almost disoriented".
Labour's poor performance over the budget both reflects and compounds the party's current problems. It has yet to come to terms with being ousted from government after eight years in the hotseat, and the sense of powerlessness that brings.
And on top of that the party is bogged down by questions over Wendy Alexander's leadership. Whatever the eventual outcome of the long-running saga over dodgy donations to her campaign, there are concerns inside the party over her performance in the post and there are serious doubts about whether she will lead Labour into the Holyrood elections in 2011.
If the budget had been defeated and Mr Salmond had carried out his threat to resign as First Minister, there could have been an election in a couple of months – which would almost certainly have seen the SNP strengthen its position in the parliament.
The threat, delivered on the eve of yesterday's vote, was a clever ploy by Mr Salmond. If his brinkmanship produced a victory, he would be seen as the strong man who had successfully imposed his will on parliament. If, by any chance, he were to lose, it would catapult the opposition parties into an election they did not want and the SNP would win.
The SNP would have fought the election highlighting their plans to freeze council tax and warning the alternative was a 20 per cent increase in bills.
As it turns out, there will be no need to get out the rosettes and dust down the ballot boxes after all.
But Mr Salmond probably knew it was a threat he would never have to carry out.
Labour scornfully described the resignation warning as an "unedifying pantomime" and "vacuous bravado".
And the party claimed the Tory votes had been secured already. One Labour insider says: "He only made the threat of because he knew the deal was in the bag."
The Tories insist they only decided how they would vote when they heard Mr Swinney's speech. But there's no doubt they have emerged as winners from the budget process, along with the Greens, Ms MacDonald and, of course, the SNP.
If the SNP has passed its biggest challenge, Labour and the Lib Dems have failed theirs. They will need to get their act together if they are going to have any influence at Holyrood.
The full article contains 911 words and appears in Edinburgh Evening News newspaper.