The Barcelona defender Dani Alves showed a humorous response to racist abuse after eating a banana thrown at him during Barcelona's La Liga victory at Villarreal on Sunday.

The Brazilian full-back was preparing to take a corner at Villarreal's El Madrigal stadium when the piece of fruit landed on the pitch next to him. A nearby linesman and the home supporters were then surprised to see the Barça player peel open the banana and eat it while proceeding to take the corner.

"We have suffered this in Spain for some time," Alves said. "You have to take it with a dose of humour. We aren't going to change things easily. If you don't give it importance, they don't achieve their objective."

Barcelona also had the last laugh in a curious game, which saw the home side take a 2-0 lead early in the second half only to then score two own goals and then fall to Lionel Messi's late winner.

After a goalless first half, strikes from Cani and Manuel Trigueros saw Villarreal lead 2-0 by the 55th minute and seemingly put an end to Barcelona's hopes of winning the title.

But Villarreal then self-destructed with own goals by Gabriel Armando in the 65th and Mateo Musacchio in the 78th minute both after good work from Alves.

Messi then scored the 83rd-minute winner after Sergio Busquets and Cesc Fábregas had combined to set the forward up to score his 27th league goal of the campaign.

Messi therefore reached 40 goals in all competitions for the fifth straight season and, more importantly, moved Barça back up to second in La Liga, four points behind the leaders Atlético who won again, 1-0 at Valencia.

It was Barcelona's first game since the death of their former coach, Tito Vilanova, on Friday from cancer. Like all La Liga games this weekend, a minute's silence was observed in memory of the 45-year-old before kick-off at El Madrigal.