El Clásico took its time to get going, but Real Madrid will have no concerns about that whatsoever.
Vinicius Junior opened the scoring after 71 minutes before Mariano Diaz clinched the three points in injury time.
It means Zinedine Zidane's side leapfrog Barcelona at the top of La Liga, while they also have the better head-to-head record should they finish level on points at the summit.
Los Blancos also badly needed a derby win after a league defeat to Levante and a 2-1 deficit in the first leg of their Champions League last-16 tie with Manchester City. The fact that they weren't at their best against the Blaugrana won't bother them in the slightest.
Gerard Pique even commented that in the first half, this was the worst Madrid side he had ever faced, though Barcelona failed to take advantage. Pique was then involved in Real's first goal as the ball bounced off him to wrong foot Marc-Andre ter Stegen.
"Real Madrid in the first half was the worst Madrid I've faced at the Bernabeu," Pique said, via Goal.
"We missed a chance to hurt them. We have to play better than in second half, though, we lost balls and they grew in confidence.
"They were giving off the worst possible impression and I don't say it as a criticism. We all have problems in our clubs.
"But I have the feeling that it's an important missed opportunity [for Barcelona]."
Pique may say he wasn't criticising Real, but Sergio Ramos has not seen it that way and has immediately hit back.
"Everyone's opinion is respectable," the defender told reporters.
"I sign up to win all Clasicos by making a first half as bad as he says.
"The approach was different. In the first half, we left the ball and in the second we decided to go.
"They were not so fresh and we started to generate chances."
Ramos is right, of course. Come the end of the season, nobody will remember that Madrid got off to a slow start in the Clasico, but that game could well prove the difference in the title race.
Even if Real aren't without their problems, the shortcomings of Quique Sétien's side look far more serious.
- Cristiano Ronaldo's reaction to Vinicius goal vs Barcelona
- Marcelo's celebration after goal-saving tackle on Leo Messi
- Sergio Ramos discusses his huge respect for Messi