The result meant Real Madrid moved up to second in the standings.
The defender became only the second player after Barcelona’s Lionel Messi to score in 16 consecutive Spanish league campaigns.
This was when he slotted home from the penalty spot at the second time of asking for Real’s third goal in the 24th minute.
Ramos had initially seen his shot saved but was given a