Right before he took a corner kick in a game against Villareal Sunday, Barcelona defender Dani Alves took the opportunity to gulp down some potassium.

Someone in the stands threw a banana onto the soccer pitch directed at Alves, a cruel and racist taunt that’s been in soccer for decades. Alves decided to eat it, deflating the insult and gaining an energy boost in the process. “I don’t know who threw the banana but I want to thank him,” Alves told the Daily Mail. “It gave me the energy to put two more crosses in for our goals.”

“We have suffered this in Spain for some time,” Alves said in a post-match press conference. “You have to take it with a dose of humor. We aren’t going to change things easily. If you don’t give it importance, they don’t achieve their objective.”

It was a small way of tackling a huge problem. Last year, a frustrated Alves spoke about the racism he encountered in Spain when he endured monkey chants from fans of Real Madrid. He called it a “lost war.”

“I know that people are fighting against this but these kinds of things keep happening,” he told Reuters. “I have been in Spain for 10 years and it has been happening since the first day. Drastic measures should be taken, for example, punishing the club more severely not just with a €1,000 or €2,000 fine [about $1,300 to $1,700.] You have to go a bit further. Sometimes you have to make an example. In England it doesn’t happen and when it does the punishments are exemplary.”

There’s a long history of taunting black players by imitating monkeys or throwing bananas at them. Some have responded by ignoring the harassment, while others have walked off the pitch in anger and humiliation. Thierry Henry talked about the problem in a 2005 interview with Bryant Gumbel for HBO’s Real Sports. And it extends past the soccer pitch. Individuals threw two bananas at Philadelphia Flyers right winger Wayne Simmonds in 2011, and last year, a fan threw a banana at the Baltimore Orioles’ Adam Jones during a game in San Francisco.

“When you’re a black man playing in a predominantly white man’s sport, you’ve got to come to expect things like that,” Simmonds told Philly.com. “Over the past 23 years of my life, I’ve come to expect some things like that. But I’m older and more mature now, I kind of just left things roll off [my back]. I try not to think about stuff like that.”

In 2012, Chris Samba responded by throwing the banana back after a fan threw one on the pitch.