Real Madrid coach Santiago Solari admitted his side's win at Huesca was not pretty but felt the points were all that mattered.
Gareth Bale scored the only goal as Real moved into the LaLiga top four with a hard-fought 1-0 win over the bottom side on Sunday.
The blustery conditions made football difficult at El Alcoraz while Huesca battled hard and forced several good saves from Real's Thibaut Courtois.
Solari said on realmadrid.com: "It was an imprecise, stop-start and very windy game. The wind is a factor which leads to sloppiness, even more so than the rain.
"It wasn't a game to remember but if you want to win LaLiga, you have to win these matches. We've picked up all three points, which is the most important thing.
"Sometimes this is the way games go and there's nothing you can do to change it, but you have to know how to win them.
"We were in front, Huesca really put us under pressure in the second half, with the wind behind them, and we managed to defend our goal until the final whistle. We struggled to increase our advantage and suffered a bit with the game played mostly in our half of the pitch."
Bale was Real's stand-out player, volleying home after eight minutes and forcing another good save from Huesca goalkeeper Aleksandar Jovanovic.
Solari said: "He and the rest of the team were all fantastic. He scored a great goal and it was enough to get the win. His goal and the general character of the team were crucial in taking all three points.
"We're not that suited to this type of match but we got the three points."
Huesca coach Francisco Rodriguez felt his team were unfortunate not to get anything from the game.
He said: "We played a very good game, we competed very well at home, but we leave without adding (points). It hurts to lose like that.
"We cannot blame the players, that early goal could have hurt but the team continued to believe. I think we were superior to Madrid at times."
ga('create', 'UA-72310761-1', 'auto', {'name': 'pacontentapi'});
ga('pacontentapi.set', 'referrer', location.origin);
ga('pacontentapi.set', 'dimension1', 'By Press Association Sport staff');
ga('pacontentapi.set', 'dimension2', '860519d3-9506-4ea6-b8ee-4488efb79865');
ga('pacontentapi.set', 'dimension3', 'paservice:sport,paservice:sport:football,paservice:sport:world');
ga('pacontentapi.set', 'dimension6', 'story');
ga('pacontentapi.set', 'dimension7', 'composite');
ga('pacontentapi.set', 'dimension8', null);
ga('pacontentapi.set', 'dimension9', 'sport:football');
ga('pacontentapi.send', 'pageview', { 'location': location.href, 'page': (location.pathname + location.search + location.hash), 'title': 'Solari admits victory at Huesca not pretty as points all that mattered'});