MADRID (AP) -- Gareth Bale scored early in the first half and Real Madrid held on for a harder than expected 1-0 win at last-placed Huesca on Sunday to move closer to the top of the Spanish league.
Bale found the net in the eighth minute and Madrid withstood pressure from the league newcomer to move to fourth in the standings after 15 matches, behind Atletico Madrid, Sevilla and leader Barcelona.
Barcelona and Atletico Madrid won their games on Saturday, while Sevilla was held by Valencia to a draw.
The match in Huesca happened only a few hours before fierce Argentine rivals River Plate and Boca Juniors played in Real Madrid's Santiago Bernabeu Stadium in the final of the Copa Libertadores, South America's equivalent of the Champions League. The second leg of the final was moved to the Spanish capital after the match in Argentina was marred by fan violence.
Madrid struggled against a Huesca team that hasn't won in 16 straight matches. Huesca has only won once in the league this season -- in the first round at Eibar.
Huesca is making its first-division debut and had never played against Real Madrid.
Santiago Solari's team needed a solid performance by goalkeeper Thibaut Courtois to hold on to the win, the team's fourth consecutive victory in all competitions after a humiliating 3-0 defeat at Eibar in the league.
"We couldn't do much in the second half," Courtois said. "We know we have to improve, but it's difficult to play these types of matches."
Courtois and other Madrid players said strong winds in the second half made it harder for the team to control the game.
Marco Asensio and Francisco "Isco" Alarcon, who had led the team to a 6-1 rout of third-division club Melilla in the Copa del Rey on Thursday, entered Sunday's match in the second half but made no significant contribution.
Bale scored with a neat volley from inside the area, side-footing a cross by Alvaro Odriozola.
The Wales forward, jeered by some fans in the team's league win against Valencia last weekend, hadn't scored in 10 league matches.
Real Madrid was ninth in the standings after losing 5-1 at Barcelona in a match that led to the firing of coach Julen Lopetegui.
Barcelona won 4-0 at Espanyol in the Catalan derby on Saturday, while Atletico defeated Alaves 3-0 at Wanda Metropolitano Stadium.
BASQUE COUNTRY THRILLER
Eibar and Levante drew 4-4 in a thrilling back-and-forth game in Basque Country.
The hosts led 4-2 until the 75th minute, when Levante pulled one closer with an own-goal by Eibar defender Paulo Oliveira. The visitors equalized in second-half stoppage time with a goal by Borja Mayoral.
The draw kept Levante sixth in the standings, while Eibar dropped to 14th.