Women in Scotland will get free tampons after the Parliament unanimously passed a landmark vote.
It means Scotland will become the first country to make period products freely available.
The law introduces a legal right of free access to items such as tampons and sanitary pads in public buildings.
Scottish Labour MSP Monica Lennon, who introduced the bill, said: "Periods don't stop for pandemics and the work to improve access to essential tampons, pads and reusables has never been more important."
The Labour MSP has been working to tackle period poverty since she was elected to Holyrood in 2016.
She said: "On the issue of period dignity, I am beyond proud that Scotland is leading the way and we have moved at a fast pace in a short space of time."
Ms Lennon told MSPs: "We have got here because we have worked together. We have shown that this Parliament can be a force for progressive change when we collaborate.
"Our prize is the opportunity to consign period poverty to history. In these dark times we can bring light and hope to the world this evening."
Her Bill was passed by 121 votes to zero after winning the support of the Scottish Government and the other opposition parties in Holyrood.
Scotland's Communities Secretary Aileen Campbell hailed the passing of the legislation as a "significant moment for gender equality".
She said it was a "great privilege to be here today on a day that we will commit to Scotland becoming the first country in the world to legislate to ensure that free period products are available to all who need them".
Ms Campbell added: "This legislation will do much to advance equality and social justice here in Scotland and elsewhere, as other countries seek to follow our path."
Rose Caldwell, chief executive of the charity Plan International UK, said: "In making this world-first commitment, the Scottish government has shown itself to be a pioneer in tackling period poverty, and we hope that nations around the world will follow its lead.
"With this landmark legislation, Scotland could soon become the first country in the world to eliminate period poverty once and for all, and with household finances under strain from the coronavirus restrictions, the need has never been greater".