Finance Secretary Derek Mackay has been told he must "go back to the drawing board" on his Budget, after a Holyrood vote resulted in stalemate.

While Labour had put forward a motion saying the Parliament "does not support the Scottish Government's Draft Budget 2017-18 in its current form", the Scottish Government was successful in amending this.

Holyrood voted in favour - by 63 votes to 58 with five abstentions - of an amendment from the Finance Secretary stressing "constructive discussions" between ministers and the opposition are continuing, as he fights to win support for his tax and spending plans.

But when MSPs voted on that amended motion, the result was tied at 63 votes to 63.

Holyrood Presiding Officer Ken Macintosh then used his casting vote to vote against it

Afterwards Liberal Democrat leader Willie Rennie warned the Finance Secretary that without "a significant compromise" in his proposals, Scotland could be heading for a snap election.

That could be the outcome if the Government can not get its tax and spending plans through Holyrood.

With the SNP no longer having a majority in the Scottish Parliament, it needs to win support from at least one of the other parties for his Budget to be passed.

Scottish Labour leader Kezia Dugdale said: "The fact that Parliament refused to back the SNP's budget proves that the Nationalists can't simply bulldoze their plans through Holyrood.

"There is no majority in Parliament for the SNP's budget. If the SNP wants to pass a budget, it needs to work with the other parties and scrap its plan for £327 million of cuts to local services.

"Parliament has sent Derek Mackay a very clear message and he must now go back to the drawing board."

Mr Rennie said: "Today's vote should act as a clear warning that there is no majority for the SNP's budget. Next week the Scottish Government plans to bring the budget officially to Parliament and unless we see serious negotiations we will see no consensus develop.

"Liberal Democrats have been engaged in serious discussions and will continue to do so. However, if the SNP fail to deliver a significant compromise on their budget then we are on the path towards a snap election which would not be to the benefit of the people of Scotland."

Today's vote came after a Labour debate at Holyrood, but next week MSPs will decide whether or not they accept the general principles of the Scottish Government's Budget Bill.

During the debate Mr Mackay urged the opposition to "adopt a productive approach" to the process and "engage in meaningful discussions and offer credible alternatives".

He said: "We have a parliamentary process, we should respect it. Not play games, but work together for the people of Scotland.

"Members must recognise the significance of not supporting a Scottish Government draft Budget, it's not just about disagreeing on the margins, it puts all our public services at threat.

"Crucial public spending that pays for our teachers, our doctors, our nurses, our local government employees and our emergency services workers."

He listed a a number of spending commitments in his draft Budget to MSPs, including record funding for the NHS, a £120 million pupil equity scheme to tackle the attainment gap in schools, investment of more than £140 million in energy efficiency and £470 million of capital spending for housing.

But Ms Dugdale told MSPs: "That sounded like a list of Donald Trump's alternative facts. The reality is he is going to make £327 million worth of cuts."

Labour wants to see the 50p top rate of income tax restored for the highest earners in Scotland, along with a 1p rise in the basic rate.

Ms Dugdale challenged the minister on the issue, saying: "When he looks at his life, when he looks at his salary and he looks at the community he represents, does he really think he pays enough tax when he's making the cuts he is faced with?"

However, Tory MSP Murdo Fraser said his party could not support the Budget, as it would lead to Scotland becoming "the most highly taxed part of the United Kingdom".

With the Green Party and the Liberal Democrats the most likely options for the Finance Secretary as he seeks to strike a deal, Mr Fraser said it "only remains to be seen which of the two remaining suitors at the court of Queen Nicola are likely to win her favour".

But Mr Rennie, who is seeking £400 million of extra cash for schools, colleges, mental health, police and transport in the Northern Isles, said: "If anybody in this Parliament thinks it's just a matter of time before the Liberal Democrats agree with the SNP for a Budget, then they are mistaken."

Meanwhile, Scottish Green co-convener Patrick Harvie said his party would not back the Budget without changes to bring in "progressive taxation" to invest in public services to "protect those facing cuts".