After weeks of talks the Scottish Greens agreed to support the SNP's tax and spending plans after winning a number of concessions from the party.

Finance secretary Derek Mackay outlined his proposed Budget to MSPs in December, but as the SNP are a minority government they did not get to simply pass the plans at will.

Mackay had to win the support of at least one opposition party and - for the second year in a row - the pro-independence Scottish Greens came to the Nationalists' rescue.

Changes secured by the Greens include scrapping an income tax cut for some higher earning Scots, the reversal of a planned real terms decrease of council budgets and an increase in the number of public sector workers who are in line for a 3% pay rise.

Holyrood voted through the first stage of the Budget on Wednesday, but the agreement will see the six Scottish Green MSPs also back it at two votes next month, meaning it is effectively signed and sealed already.

The Greens did not get everything they wanted from the talks.

It was understood they wanted more money to be spent on cycling lanes and were hoping for even more cash to help councils fund the public sector pay rise.

Here is what's in the deal:

The Scottish Government will give 75% of public sector workers a 3% pay rise next year.

Every employee in the sector earning up to £36,500 will get the uplift, with those earning more than receiving a 2% increase.

The most recent figures for inflation in the UK show prices currently creeping up at a rate of 3%, meaning the rise may well be effectively cancelled out in real terms as the cost of living increases.

Some higher earning Scots were set for a income tax cut next year due to what the Scottish Government described as an "anomaly" in their plans.

This tax cut has now been scrapped following the agreement between the two parties.

Under the original proposals, those earning between £43,525 and £58,500 were set for a small decrease in their tax bill.

To stop that, the 41p income tax threshold will be moved to £43,431 meaning all higher earners will pay more.

If you earn £50,000 a year, you will pay £84 extra in income tax compared to next year and £824 more than you would if you lived in the rest of the UK.

Most Scots will slightly pay less this year than last.

Scottish income tax rates 2018/19:

One of the Scottish Greens' main issues of contention was a real terms cut to local government finances.

The independent Scottish Parliament Information Centre said Mackay's original plans would have resulted in a £157.3m real terms cut.

This has been reversed and additional money will now flow to the councils to help fund pay rises for their workers.

As part of the agreement, £170m more will go to the authorities than was proposed in December by the SNP.

A total of £10.5m of the additional money will head to Shetland and Orkney Islands councils to support inter-island ferries.