The draft Citizen Security Law was greeted with outrage by many when it was unveiled in November 2013.
Protesters took to the streets to demonstrate against what the Spain's major opposition socialist PSOE party called "not a citizens' security bill" but " a citizen-repression bill" designed to clamp down on a rising tide of protests in the wake of the conservative Spanish government's unpopular austerity measures.
Now after months of consultation, Spain's MPs have green-lighted a watered down version of the bill.
While the scale of fines remains unchanged from the original draft — with "very serious" infractions still incurring a penalty of up to €600,000 ($800,000) — the actual fines applied will depend on how much people are able to pay.
Importantly, people who carry out unauthorized demonstrations outside public buildings including the national parliament will not be fined unless there is a serious danger to public order. In such cases the maximum fine will be a maximum €30,000, Spain's Huffington Post reported.
The new law also bans racial profiling by police when it comes to carrying out street searches, La Vanguardia newspaper reported.
Those searches must be carried out by a member of the same sex and can only be conducted to prevent or investigate a crime.
In addition, police will only be able to ask people to provide identification to prevent crimes and not civil infractions. People who fail to supply ID can only be taken to a police station to prevent a crime or if that person has already committed a misdemeanour.
Police will also no longer be to enter a private residence if the owner or tenant gives them permission, as was the case with the draft law. Instead, police must produce a search warrant issued by a judge.