Defending champions Real Madrid inflicted a first defeat of the season on La Liga leaders Atletico Madrid to move within three points of the summit.
Casemiro’s 15th-minute header from Toni Kroos’ corner gave the hosts a deserved lead at the Alfredo Di Stefano Stadium.
Dani Carvajal’s excellent second-half strike from outside the box rebounded off the post and in off the back of Atletico goalkeeper Jan Oblak.
Real climb to third, while Atletico remain one point above Real Sociedad.
Both sides safely progressed to the Champions League last 16 with 2-0 victories in midweek, as Real beat Borussia Monchengladbach to win Group B and Atletico Madrid overcame RB Salzburg to finish second to Bayern Munich.
In La Liga, Diego Simeone’s side had won seven consecutive league games going into the derby, conceding just twice in their first 10 La Liga fixtures.
But it was Real who dominated in the early stages and Oblak produced an excellent save to tip Karim Benzema’s shot onto the post before Casemiro’s opener.
Simeone responded to a disappointing first half with three changes and his side were much improved after the break, though substitute Thomas Lemar shot agonisingly wide from Marcos Llorente’s low cross after 55 minutes.
That miss proved pivotal, as Carvajal’s powerful attempt doubled Real’s advantage seven minutes later.
Thibaut Courtois produced a good save from Saul Niguez to deny Atletico a late lifeline with their only shot on target, as the visitors fell to a first defeat in 26 league games – since a 1-0 loss in this fixture on 1 February.