Gareth Bale ended a three-day drought in La Liga to give Real Madrid a 1-0 victory over the basement club Huesca on Sunday, taking his side back to top four at Alaves' expense.
Wales forward, who had not found the net in the league since September 1 but scored in the Champions League, gave Real the ideal start, home draw by Alvaro Odriozola in the eighth minute.
Huesca, under the table with scant seven points and no victory from the first day of the season, did not fall against the European champions and had to fly away from Thibaut Courtois to avoid the leveling of Ezequiel Avila soon.
Bale lost another goal in the second half by Huesca goalkeeper and the home team was besieged by Real in the final phase but fell without a draw as Courtois threw a dangerous free kick over the bar in a downtime and Dani Carvajal did a frantic customs clearance.
Real's eighth victory in nine matches in all matches with coach Santiago Solari saw them climb over Alaves in fourth place in 26 points after 15 games, five behind the Barcelona leaders.
It was a remarkable improvement from Real's formidable form earlier in the campaign that saw the club distribute with coach Julen Lopetegui but Real still struggles to dominate the games even against a seemingly weak opposition like Huesca.
They have made significant progress in defense, however, and that was their sixth clean sheet under Argentina Solari.
Courtois admitted that his side had performed badly, especially after the break.
"In the first half we played well, we controlled the game and did things on the right track," he said.
"The second half was complicated, we had the wind against us and it was hard to play right, we did not do anything in the second half."
Solari, however, praised his side for digging and seeing the result.
"We knew how to defend our goal to the end," the coach said.
"Bale has scored a big goal, winning the three points, and the team's character. If we want to fight for La Liga, we have to win these types of matches."