Most of the cuts that were planned for higher education have been reversed, the finance minister has announced, as the Welsh budget was passed.
The Higher Education Funding Council for Wales (HEFCW) had been facing cuts of £42m, around a third of its budget.
But Jane Hutt told AMs £31m of them will be cancelled. HEFCW will now have to find £11m worth of savings.
She also set out plans to use £2.5m from reserves to help soften the blow of cuts to three rural councils.
Ms Hutt said she would allow HEFCW - which funds Welsh universities - to keep £21.1m which was due to be diverted to tuition fee subsidies, and would give it an extra £10m to support part-time courses and research.
In a statement, HEFCW responded: "A cut of 32% to HEFCW's budget would have had a real impact on universities' ability to meet Welsh government priorities.
"We are delighted that the contribution of Welsh universities to the economy and society of Wales has been acknowledged."
Universities Wales chairman Prof Colin Riordan praised ministers for the "understanding" he said they had shown for universities' concerns after the draft budget was published in December.
"Whilst the funding outlook for 2016/17 remains unprecedentedly tough, we are now more confident that Welsh universities will be able to manage in the short term until future challenges can be faced," he said.
The assembly voted on Tuesday to approve the 2016/17 budget, which includes an extra £278m for the NHS.
With Labour in favour and the Tories and Plaid Cymru voting against, the Liberal Democrats abstained, allowing the budget to pass.
There was an outcry from opposition parties when plans to cut council budgets by an average of 2% were announced in December, with rural authorities facing the biggest cuts.
The Liberal Democrats claimed credit for securing some recompense for the three biggest losers.
- Powys has been promised an extra £1.93m
- Ceredigion gets an extra £439,000
- Monmouthshire gets an extra £109,000
Ms Hutt told AMs: "Where we've considered that evidence is compelling we have made some adjustments to our spending plans to support our priorities.
"We are confident that our plans are the right plans to invest in the future of Wales - a clear way forward supporting jobs growth and the services that mean the most to the people of Wales."
The budget is the result of a two-year deal between Labour and the Liberal Democrats after extra money was allocated to pupils from disadvantaged backgrounds.
Conservative Shadow Finance Minister Nick Ramsay accused ministers of announcing "piecemeal rises" to health and education spending.
"This budget is more an attempt to make up for past underfunding than a genuine investment in our vital services," he said.
Plaid Cymru criticised ministers for being "committed to spending their entire borrowing capacity" on a planned M4 relief road around Newport.
Finance spokesman Alun Ffred Jones said: "We will not support a budget, or a government, which we see as failing to meet the needs of all the regions of our country."
Liberal Democrat Peter Black claimed the budget had been "significantly improved" by his party.
Examples included "extra money for poorer pupils, the money which we've brought into cheaper transport for 16-18-year-olds, the extra apprenticeships and the additional capital funding we've had delivered around Wales", he said.