Ancelotti: Real up for title fight
With both leaders Atletico Madrid and arch-rivals Barcelona recording wins earlier in the day against Villarreal and Real Betis respectively, Ancelotti's men knew that anything less than a victory would leave them with a mountain to climb in the Liga race.
However, their nerves were settled just before half-time when former Sociedad midfielder Asier Illarramendi tapped home after Claudio Bravo had saved Karim Benzema's initial effort.
That opened the floodgates for Ancelotti's side, who added three more goals after the break courtesy of Gareth Bale, Pepe and Alvaro Morata, to leave the Italian delighted.
He said: "I appreciate the whole game because we played very well, very intelligently. I'm very happy.
"It wasn't easy but I have a team that likes to fight. I'm proud to coach this team."
Much of the pre-match talk had concerned Ancelotti's decision to leave out playmaker Cristiano Ronaldo for the trip to San Sebastian, but the former Chelsea boss felt that call was vindicated, with Bale putting in an accomplished performance on the wing.
He added: "Gareth Bale is comfortable on the left and he and Cristiano often change positions.
"We had to avoid injury so I rested Cristiano. My second concern was the physical aspect of the team."
The win leaves Madrid three points off the top of the table and the 54-year used the opportunity to issue a warning to their title rivals, claiming: "The victory strengthens us and the team. We will fight until the last game."