Ousmane Dembele scored twice and Lionel Messi added to his league-leading tally as champion Barcelona stayed on track to finish unbeaten in the Spanish league with a 5-1 rout of Villarreal on Wednesday.
A depleted Real Madrid, without Cristiano Ronaldo and many other regular starters, lost 3-2 at Sevilla to remain in third place behind Atletico Madrid. It was an eventful night for captain Sergio Ramos, who missed a penalty, converted a penalty and scored an own-goal.
Philippe Coutinho and Paulinho also scored for Barcelona, which has already won the title but it is still trying to become the first team to go through the entire season unbeaten in the league's current format.
With two matches left, Barcelona reached 90 points, 15 more than second-place Atletico. Its final games are at Levante and against Real Sociedad.
"It's a great victory, it keeps us unbeaten and that's how we want to finish the season," Barcelona defender Nelson Semedo said.
Villarreal stayed in sixth place, still in position to qualify for next season's Europa League. It is two points behind fifth-place Real Betis and three points in front of seventh-place Sevilla, which occupies the last spot in the qualifying zone for the second-tier European competition.
Before the match, Villarreal players lined up on the field to congratulate Barcelona for its title in a guard of honor that Real Madrid had declined to give its rival in their match at Camp Nou last weekend.
Wednesday's match was postponed from two rounds ago, when Barcelona and Sevilla met in the Copa del Rey final. The Catalan club won 5-0 to earn the first leg of its double.
Coutinho opened the scoring in the 11th minute off the rebound of a shot by Dembele, and Paulinho added to the lead with a touch from close range five minutes later.
Messi got on the board just before halftime after a perfect pass by Andres Iniesta. It was Messi's 34th league goal, leaving him with nine more than Real Madrid's Cristiano Ronaldo, his closest contender in the scoring race.
Dembele scored his first goal in the 87th after a low pass by Ivan Rakitic, then closed the scoring after a long run from near midfield.
Barcelona has scored 94 goals in 36 matches in the league this season.
Villarreal got on the board with a 53rd-minute goal by Nicola Sansone.
Sevilla defeated Madrid for its second straight win after enduring a nine-match winless streak in all competitions.
Wissam Ben Yedder and Miguel Layun put Sevilla ahead in the first half, and the hosts added to the lead with an own-goal by Ramos while he tried to block a cross.
Ramos, a former Sevilla player who is often jeered by the crowd when he plays in Seville, missed his first penalty attempt by sending the ball onto the crossbar early in the second half. He converted from the spot in the final minute of stoppage time, not long after Borja Mayoral scored Madrid's first goal in the 87th.
"We played better in the second half but couldn't get it done in front of the goal," Madrid coach Zinedine Zidane said.
The loss leaves Madrid three points behind Atletico ahead of the team's final two games, against Celta Vigo and at Villarreal. Atletico is at Getafe and then hosts Eibar.
Among other players rested by Zidane on Wednesday were Luka Modric, Keylor Navas, Marcelo, Toni Kroos and Raphael Varane.
Madrid will play Liverpool in the Champions League final on May 26.