Luis Suarez, Antoine Griezmann and Ansu Fati were all on the scoresheet with Lionel Messi providing a couple of assists.
Barcelona responded to a trying week by thrashing Villarreal 4-1 away to stay alive in the Liga title race, producing one of their best displays under coach Quique Setien.
The Catalans had drawn their last two matches to hand more momentum to league leaders Real Madrid but Sunday's win took them to 73 points after 34 games, four behind their arch-rivals who beat Athletic Bilbao earlier on Sunday.
An own goal from Pau Torres put Barca in front in the third minute, with Villarreal's Gerard Moreno levelling on the rebound in the 14th before the visitors restored their lead through an outstanding curling strike from Luis Suarez six minutes later.
Antoine Griezmann stretched Barca's advantage just before the break with a sublime chip, having been dropped from the starting lineup in the last two games, while 17-year-old Ansu Fati added a fourth in the second half with a low strike.