Raphael Varane scored twice as Real Madrid had to come from behind to beat bottom club Huesca and ease the pressure on Zinedine Zidane.
Real boss Zidane had demanded "respect" from journalists before Saturday's game, claiming his side were still in the La Liga title race.
But Javi Galan fired Huesca into a shock lead before Varane equalised for the reigning champions.
France defender Varane then tapped home a late winner for the visitors.
Real, who are second in the Spanish top-flight table, trail city rivals Atletico Madrid by seven points having played two games more.
Zidane's side had won just one of their previous five matches and the poor run has led to media scrutiny over the French manager's position at the club.
Despite victory, his side's latest performance will have done little to boost Zidane.
Huesca, who had won just two of their previous 21 league games this season, took the lead when Galan was set up by Shinji Okozaki.
It was nearly 2-0 moments later but Rafa Mir, who is on loan from Wolverhampton Wanderers, volleyed against the bar.
Real equalised when Karim Benzema's free-kick came back off the bar and centre-back Varane headed the rebound over the line.
Varane was then in the right place to tap home the winner after keeper Alvaro Fernandez palmed Casemiro's header into his path.
"It was very important to win today. We know the difficulties lately," Zidane said postmatch. "It's a good victory for us. Three points. We played a game with character."
He added: "The start of the game, it's true, in this situation we weren't comfortable, we started OK but after 20 minutes we got into the game well. We had to win. It's little by little.
"We have to get back to playing good football, playing with joy as Real Madrid do. We have to be patient, today we can be happy with what we did."