After an early scare that saw David Ferreiro head wide, Madrid took the lead after eight minutes when Gareth Bale struck to take them up to fourth.
2018 ScheduleAll times ET
First-half goals from Antoine Griezmann, Thomas Partey and Koke helped a resurgent Atletico Madrid secure a 3-0 home victory over Huesca on Tuesday.
Luis Suarez scored Barcelona's third in an 8-2 win against Huesca but it initially looked like the goal would be ruled out for offside.
Lionel Messi and Luis Suarez scored twice each as La Liga champions Barcelona turned on the style to hammer Huesca 8-2 on Sunday.
Huesca were promoted to La Liga for the first time, now they face Barcelona with a budget smaller than Lionel Messi's salary and a brave attitude.
Huesca are willing to be one of the La Liga sides that play a game in North America this season, the club's CEO has exclusively told ESPN FC.
Huesca insist they will not keep tabs on Ruben Semedo despite the defender awaiting trial on charges of attempted murder, kidnapping and robbery.
Huesca will play in La Liga for the first time in the club's history next season after beating Lugo 2-0 in the Segunda division.
Real Sociedad will take an advantage into their home leg of the Copa del Rey fourth round after winning 3-1 at Real Valladolid on Thursday.
Atletico Madrid defeated third-tier side Reus 1-0 on Thursday, comfortably advancing to the round of 16 of the Copa del Rey 3-1 on aggregate.
Barcelona's "second" team scored eight goals in a thrashing of Huesca, while Valencia move on after a hard-fought draw vs. Rayo Vallecano.
Watch Spanish third tier side Huesca's players celebrate being drawn against Barcelona like they've actually won the Copa del Rey.