Karim Benzema stopped Real Madrid's underwhelming La Liga season going from bad to worse on Sunday after firing a last-minute winner to hand the European champions a barely-deserved 3-2 winner over bottom club Huesca.
Humbled by Ajax in the Champions League and dumped out of the Copa Del Rey by deadly rivals Barca, third-placed Real showed little signs of improvement in Zinedine Zidane's second game in charge but Benzema, subject to rumours he may leave Madrid in the summer for Manchester United, struck with a fine curling finish the to snatch the three points at a sparsely populated Santiago Bernabeu.
"We are happy with him and I am going to count on him, now there are nine games left and then we will see what happens. He is a Real Madrid player and I don't think this will change," Zidane said.
"You have to accept it. If the people want to come to the Bernabeu to see us so much the better, but I understand that since we are not going to win anything fewer people come."
Real move to within two points of second-placed Atletico Madrid, who hammered Champions League hopefuls Alaves 4-0 on Saturday in a match that saw Diego Costa score for the first time since November.
However Real still lag 12 points behind leaders Barcelona, who are 10 clear of Atletico and heavy favourites to retain their La Liga after Lionel Messi fired them to their sixth league win on the bounce, 2-0 at home to local rivals Espanyol on Saturday, with a brace that took the Argentine to 31 league goals this season.
Zidane's son Luca was given his second ever start between the sticks for Real but got off to the worst possible start, picking the ball out of his own net within three minutes after Cucho Hernandez lashed home Ezequiel Avila low cross.
Isco levelled the scores in the 25th minute when he tapped home a Brahim Diaz cross after Benzema's low shot was well saved, but it was the away side -- playing their first ever La Liga game at the Madrid's Santiago Bernabeu stadium -- who went closer going into the break ahead.
Zidane junior had to be alert to stop Damian Musto from glancing home a header nine minutes before the break, while Avila punched the ground in frustration in first half stoppage time after flashing a power shot over from the edge of the box.
Real continued to disappoint in the second half but took the lead just after the hour mark thanks to Dani Ceballos, who bundled home the second after Gareth Bale's beautiful cross was headed back across goal by Benzema.