The charitable status of colleges had been under threat
Ministers have announced measures to secure the charitable status of Scotland's colleges.
An order laid before MSPs is expected to come into force later in the year, using powers given to ministers in the 2005 Charities Act.
If approved by parliament it will exempt colleges from the rule that charities should be independent of government.
The first minister said colleges had to be protected as "vital resources".
The move follows a review last year of John Wheatley College in Glasgow by the Office of the Scottish Charity Regulator.
The review found that ministerial powers to direct further education colleges were inconsistent with the requirement that charities should operate independently of government.
This meant that, without action by ministers, colleges would lose the right to charitable status.
Alex Salmond said: "By allowing colleges to get on with their crucial work we can improve the educational and life opportunities for current and future students.
"This move to support colleges, together with policies such as the scrapping of graduate endowment, will help lay the intellectual foundations for the modernisation of Scotland."
The move has been welcomed by Scottish colleges.
Howard McKenzie, acting chief executive of the Association of Scotland's Colleges, said: "Continuing charitable status will ensure Scottish students, businesses and communities will continue to benefit from the high quality public services offered by Scotland's colleges."