Spanish police have detained the Villarreal supporter who threw a banana on the pitch near Barcelona defender Daniel Alves on Sunday and charged him with a "breach of fundamental rights and civil liberties".

Images of Alves, a Brazil international, picking up the banana and taking a bite during the La Liga match were beamed around the world and he was widely backed by fellow players and other public figures who denounced the apparent racist taunt.

A 26-year-old man was taken into custody on Tuesday evening before being charged and released and would be appearing before a judge at a yet-to-be-determined date, a police spokeswoman said on Wednesday.

Villarreal announced they had given the supporter a life ban but Alves, who has criticised the level of racism in Spain before, felt it was not enough.

"If I could, I would put a photo of the fan on the internet so that he would be shamed," Alves told Brazil's Radio Globo.

"There is racism against foreigners," he added. "They sell the country as being first world but in certain things they are very backward."