Political analysts, the media, political parties and even Prime Minister Antonis Samaras have been trying to figure out the shocking rise of the far-right, anti-immigrant Golden Dawn party in Greece. Golden Dawn became Greece's third most important political party, with nearly 10 percent of the vote in the European elections.

The analysts and politicians have been trying to understand who is responsible for the growing support for the anti-immigrant party. After all, members of the party are being prosecuted on the charge of creating and participating in a criminal organization linked to a range of offenses, including two murders and violent attacks against migrants. And many of the party’s MPs, including its leader, Nikolaos Michaloliakos, are in prison, pending trial.

But to someone monitoring intolerance and discrimination in Greece, the results didn’t come as a surprise. Intolerant political rhetoric, hostile government policies toward unpopular and marginalized groups such as migrants, and the failure to tackle head-on the alarming phenomenon of racist violence nurtured and created the political space for Golden Dawn to blossom.

It is true that the presence of destitute migrants living on the streets has brought disconcerting change to Greek cities, particularly Athens, where Golden Dawn enjoys the most popularity. Years of failure to adopt coherent migration policies, chronic mismanagement of the asylum system, and the deep economic crisis have exacerbated the problem.

With Golden Dawn gaining in popularity over the past four years, all too often the government has adopted heavy-handed immigration measures in an effort to win voters back. Instead, such measures have given a veneer of legitimacy to Golden Dawn’s rhetoric, which in turn has helped to push the government to adopt further policies targeting immigrants.

In the 2012 national elections, Prime Minister Samaras campaigned in part on a pledge to reclaim Greek cities from immigrants. “Greece today has become a center for illegal immigrants,” he said at the time. “We must take back our cities... There are many diseases and I am not only speaking about Athens, but elsewhere too.”

Months after he was elected, the Samaras government began Operation Xenios Zeus—an epic-scale police sweep operation against irregular immigration and crime in Athens. Tens of thousands of people presumed to be undocumented migrants—based on little more than their physical appearance—have been subjected to abusive stops and searches on the streets, and hours-long detention at police stations. I documented widespread human rights violations under Operation Xenios Zeus, including the use of ethnic profiling and arbitrary deprivation of liberty.

Between August 2012 and June 2013 – the most recent period for which government statistics are available – police stopped and took to a police station almost 124,000 people of foreign origin. Only 6,910 – 5.6 percent – were found to be in Greece unlawfully.

And while xenophobic violence in Greece has become a stark reality over the past few years, the government for too long failed to respond effectively to protect victims and hold their attackers to account. Greece has taken some positive steps recently with the creation of specialized police units to tackle racist violence across the country and the appointment of a specialized prosecutor on hate crimes in Athens.

Racist motivation was introduced in 2008 as an aggravating circumstance in the commission of a crime, yet the provision was applied for the first time only in November 2013. In two other landmark convictions, in March and April 2014, for a series of attacks on Pakistani men and the murder in Athens of a 27-year-old worker from Pakistan, the court failed to classify the acts as racially motivated. By not improving the scope and application of the aggravating circumstance, the government and the justice system is failing to send a strong message against hate crimes.

The government needs to institute reforms to encourage reporting of violent hate crimes, protect victims, and ensure appropriate action by the police and judiciary to counter hate violence. Yet a draft anti-racism law has been pending in Parliament since November 2013, hostage to political infighting and Golden Dawn’s popularity. The bill focuses on hate speech and incitement to violence, but could and should be improved by parliament and then passed.

The bottom line is that if the Greek government is truly looking for answers to Golden Dawn’s success, officials should look at the anti-immigrant policies that have fostered the climate in which the party has blossomed. The response to intolerance should never be more intolerance.

Eva Cossé monitors Greece for Human Rights Watch.