Real Madrid reduced the gap at the top of the Primera Division to eight points ahead of next week's El Clasico as Cristiano Ronaldo's hat-trick led to victory over Deportivo.
Riki had given the visitors a shock lead on 15 minutes but Real were level seven minutes later when Ronaldo scored from the penalty spot after Manuel Pablo had brought down Angel Di Maria.
And the hosts were in cruise control by half-time as Di Maria and Ronaldo nodded in from close range just before the break.
Pepe headed in the fourth 23 minutes from time following Xabi Alonso's free-kick, before Ronaldo completed his hat-trick with another penalty after Evaldo had been harshly adjudged to have handled Kaka's cross.
Ronaldo fired straight at Daniel Aranzubia when put through by Sami Khedira in the 10th minute, but it was Deportivo who opened the scoring when a patient move down the right eventually found Riki on the edge of the area, the tall striker skipping past Raphael Varane before prodding the ball beyond Iker Casillas.
Di Maria could have replied instantly but he chipped over after receiving a clever through-ball from Mesut Ozil. But it was the Argentinian international who was responsible for creating the equaliser as he burst past a helpless Pablo before being upended by the 36-year-old just inside the area.
Ronaldo duly stepped up and sent Aranzubia the wrong way to convert his second penalty in as many games.
The visiting keeper did brilliantly, though, to deny the Portuguese international 10 minutes later, tipping his powerful shot over the crossbar after another sensational pass from Khedira.
Real's second goal was coming, however, and it arrived seven minutes before the break when Luka Modric split the Deportivo defence and, despite Aranzubia making another good save to turn Di Maria's initial effort onto the post, the winger headed in the rebound.
Ronaldo then made it three in similar fashion as Aranzubia parried a Sergio Ramos effort back into the centre of the goal where the former Manchester United man was well-positioned to nod home.
Real boss Jose Mourinho rewarded Kaka for his hat-trick against Millionarios in a midweek friendly with his first appearance of the season as he replaced Ozil at half-time but it was fellow substitute Alonso who nearly added a fourth as his fierce long-range drive was turned behind by Aranzubia.
Alonso would have a hand in the fourth goal, though, as it was from his free-kick that Pepe found acres of room to head home his first goal of the season.
More heroics from Aranzubia prevented an even bigger margin of victory for the hosts as he repelled efforts from Ronaldo and Kaka, but he was beaten from the spot once again when Ronaldo fired his second penalty of the night in off the post eight minutes from time.