The Islands (Scotland) Bill was put forward following the Our Islands Our Future campaign, carried out ahead of the Scottish independence referendum to demand more power for the islands.
The new law, passed unanimously, means government and public sector legislation and policies will have a duty to take the impact on the islands into consideration known as island-proofing.
A National Islands Plan will also be created.
Opposition MSPs secured changes to the legislation at the final stage to allow greater devolution of power to the islands and retrospective island-proofing of laws and policy, as called for by Orkney Islands Council, both on request and subject to permission being granted by ministers.
MSPs agreed to have Shetland accurately represented on any public authority maps instead of being boxed-off in a non-geographically correct location after a campaign by Shetland MSP Tavish Scott.
Islands Minister Humza Yousaf said the bill was an “important milestone”.
He said: “This bill is not for government nor for Parliament nor even for the agencies that will play a key role.
“It is about people and it is for the people - those who have contributed to our islands’ heritage, those who contribute to their wellbeing now and those who are yet to come for whom this bill gives them and us all a strong platform on which to build a bright future for Scotland’s islands.”
Tory MSP Peter Chapman said: “This bill is a positive step for the islands and we as a group support the bill believing that it can make a difference to our island communities.
“The main point of this bill was always to empower island communities and this can now start on the islands through their own councils and authorities and this will be something which we will be monitoring post-legislatively to ensure that island authorities are achieving the results intended.”
Labour’s Colin Smyth said the changes made mean the bill is “much stronger” than the initial legislation.
He praised many aspects and said the ability to have greater devolution of powers to the islands will reverse the “drift of centralisation” but said it could have been “more radical”.
Green MSP John Finnie predicted it will be a “historic” piece of legislation. Lib Dem representative Mike Rumbles praised his party colleagues in the islands and their part in strengthening the bill.
Orkney Islands Council leader James Stockan said: “I am delighted that the Scottish Government and MSPs from other parties have listened to our case and have ensured that this will be fit-for-purpose legislation that delivers transformational support for island communities for many years to come.”