Karim Benzema opened the scoring in the 12th minute by converting a rebound after Marc-Andre Ter Stegen saved from Vinicius Junior, with Fede Valverde drilling home the second from the edge of the box before the break.
Ferran Torres pulled one back for Barcelona in the final stages after good work by Ansu Fati, but Rodrygo won and converted a late penalty to ensure his team inflicted Barcelona’s first domestic defeat of the season.