There were 233 votes in favour of the directive, which is set to come into effect on May 1st, 2012 and has been a topic of Riksdag discussion for years.
41 members voted against the proposal and 19 members were absent.
“The data retention directive doesn’t in any way live up to the standards we require of legislation,” Green Party MP Maria Ferm said as she started the debate in the Riksdag.
“It’s an infringement on personal privacy way out of proportion relative to its utility.”
Ferm’s party, along with the Left Party, have been staunchly opposed to the legislation, which is meant to bring Sweden in compliance with an EU directive from 2006 which requires internet service providers to store citizens’ telecommunications data.
The Sweden Democrats, meanwhile, wanted to require that data on Swedes only be stored in Sweden.
And while the centre-right Alliance government had pronounced its support for the legislation, a number of individual MPs had claimed ahead of the vote that they would vote against the directive.
However, support from the Social Democrats ensured the measure passed with a wide majority.
According to the legislation, internet service providers will be required to data about clients’ telephone, messaging, and internet use for six months.
Jon Karlung, chair of internet provider Bahnhof, is a staunch critic of the law, which he characterized as “mass surveillance”.
In an effort to protect its clients, Bahnhof is planning to ensure that all of its users remain anonymous online by creating a system that would assign all customers the same IP address.
“And if they want their data to be stored, they’ll have to pay extra for it. My plan is that our entire stock of customers can be made anonymous and that will happen in the second half of the year,” he told the TT news agency.
Nils Weidstam from Swedish IT industry association IT- och telekomföretagen said the fines Sweden would have to pay for not implementing the EU directive are small compared to the costs associated with implementing the measure.
“The costs of implementing the directive will be at least ten times higher than the fines of 70 million kronor that have been mentioned,” he told TT.
“We estimate the costs to be closer to one billion kronor. And it will be the subscribers who have to foot the bill, not only mobile phone customers, but also those who have fixed lines or internet accounts,”
Weidstam also warned that several companies would be knocked out by increased data storage costs.
Following the vote, the head of the Pirate Party Anna Troberg, also expressed her disappointment that the law had been passed.
“This decision uncovers a sinister attitude problem among those in power,” she said in a statement.
“They have lost respect for the individual and their fundamental rights. The data storage directive is not only unworthy of a democratic society, it is ultimately quite incompatible with it.”
On top of this, Troberg believes the data storage directive will lead to a shift in people’s normal activity, prompting them to forego visits to psychologists, marriage counselors, or attend events such as gay pride festivals.
The head of Sweden’s National Bureau of Investigation (Rikskriminalpolisen), Klas Friberg, also cast doubt on whether the measure would help police.
“My assessment is that it worsens our ability to fight serious crime,” he told TT.