The apparent leniency of the sentence for the five migrants was due to their claimed age as it was argued they were too young and would be put at risk by being deported.
However, like thousands of migrants the gang arrived with no formal documents. People traffickers advise illegal migrants to destroy formal papers to make it more difficult for the authorities to assess their age.
The district court in Uppsala, north of Stockholm, sparked outrage with the decision and interior minister Anders Ygeman said a new law on age assessment was required.
Mr Ygeman said there was widespread support for the crackdown, after one of the rapists, who claimed to be 17-years-old, was assessed to be 18 by the Swedish Migrant Board.
Anders Ygeman has called stricter age tests after five migrants who raped a boy escaped deportation
And as under-aged asylum-seekers are less likely to be deported, it has sparked concerns migrants will exploit the legal system.
The leading politician said: “The risk is that you do not get the right punishment to the right person, and that people claim to be younger than they are.
“A legal support to make age estimates is important so individuals can’t claim a false age and also to prove protection for juvenile delinquents so that they do not get the wrong penalty.”
A legal support to make age estimates is important so individuals can’t claim a false age
“This will be a be a persistent problem in the future, in these borderline cases. You will never medically able to determine the exact age,” he said.
On Thursday, Mr Ygeman also said the Scandinavian country has been far too lenient with migrants who have either arrived without legal documents or refused to show them to authorities.
Adding a policy change was required to ensure a fair legal process, he said: “If a person doesn’t have an identity document, I think you clearly have to place the burden with the individual to prove their identity.”
“Basically, it is the applicant themselves who are responsible for making their identity known. It has been interpreted slightly differently… but that has to be the foundation.”
The Swedish Migrant Board and police have urged the government to give them new powers to they can more efficiently determine a migrant’s true identity.
The call for a crackdown on migrants falsely claiming to be minors comes as the Swedish government in October announced asylum-seekers would have to prove their age with dental checks after a state watchdog ruled it ethical.
Kjell Asplund, the Chair of the Swedish National council on Medical Ethics, has said it isacceptable to carry out tests on young asylum seekers if there are reasonable grounds to doubt their claimed age.