Madrid - Shamed by race scandals in sports and local politics, Spain is starting to crack down on racism which campaigners say it has ignored for too long.
Banana-throwing and monkey chants at football grounds and anti-Semitic tweets against Israeli basketball players have put racism in the headlines in recent weeks.
Until recently authorities "did not take it seriously because xenophobic parties were not widely represented" in national politics, said Esteban Ibarra, leader of the Movement Against Intolerance.
"There has been a significant change in the past month," however, since Spain's government published its first official figures on "hate crimes", as ordered by EU authorities, he said.
According to those figures from the interior ministry, Spanish police recorded 1 172 "incidents linked to hate crimes" such as homophobia and xenophobia in 2013.
The release of the figures, which don't cover the Basque Country, coincided with a number of apparent efforts to face up to racism.
The ministry said it had trained 23 000 police in how to spot and report racist offences.
Biting the banana
The Spanish football league has also promised to train its officials on the issue, after a racist incident at a top-level match was broadcast internationally.
Spain's football league, home to world-class athletes of various colours and nationalities, was put on the spot in April when a Villarreal fan threw a banana on the pitch near Barcelona's Brazilian defender Dani Alves.
Alves said he had often heard racist abuse during his decade playing in Spain. He won praise for picking up the banana and taking a bite before playing on.
Football authorities fined Villarreal $17 000 for the banana incident.
The club said they will close the stand from which the banana was thrown for a Europa League match in August, to "send a resounding message against racism and xenophobia".
A week after the banana incident, Senegalese footballer Pape Diop danced in defiance when he was targeted by monkey chants while playing for Levante against Atletico Madrid.
Amnesty International says racism may not be more prevalent in Spain than elsewhere in Europe, but complains it has been ignored.
"We have been demanding for more than 10 years that the authorities form a national strategy for fighting racism," said Angel Gonzalo, Amnesty International's spokesperson in Spain.
"There are cases of xenophobia, racism and anti-Semitism and cases of harassment and neglect of the gypsy community. But the authorities do not seem to take it seriously."
Spain has five million foreigners and an unemployment rate close to 26%, but unlike other EU countries such as France and Greece it has no major anti-immigration political party.
Mainstream parties were put on guard however during this month's European election campaigns when a conservative mayor in the Basque Country was accused of targeting immigrants in a foul-mouthed outburst.
The mayor of Sestao Josu Bergara apologised and said he had been referring to "delinquents" in general, not foreigners in particular.
Campaign group SOS Racism demanded "clear action by the political class, the media and citizens so that social problems not be used to justify arbitrariness, xenophobia and discrimination".
The rise of offensive chatter on social networking sites has also grabbed authorities' attention.
Last week Jewish groups brought a lawsuit after Twitter users posted 17 500 messages of anti-Semitic abuse when Israeli basketball team Maccabi Tel Aviv beat Real Madrid in the Euroleague final.
The government has vowed to crack down on hate speech via the Internet, including on sites such as Twitter and Facebook.
Lawmakers are examining a proposed penal reform that would make "incitement to hatred" punishable by up to four years in jail.