One of them is Ahmed Rezai, who told Radio Sweden: "I can now make plans for my future and finish school."
Rezai, who wants to become a doctor, applied for asylum three times, but was rejected. Under the new law, which was introduced in July but was then questioned by three out of Sweden's four migration courts, Rezai could get a new chance to receive a Swedish residence permit.
The law on upper secondary education, or gymnasielagen in Swedish, gives around 9,000 migrants – mostly Afghans often referred to as unaccompanied minors – the chance to stay in Sweden to study, even if their asylum applications have previously been rejected.
However, Omid Mahmodi of the Association of Unaccompanied Minors believes just around 6,000 people will be granted permits under the new law since many migrants have given up and left Sweden because of the delays in implementing it, he tells Radio Sweden.